a-schild / nextcloud-java-api

Java api library to access nextcloud features from java applications
GNU General Public License v3.0
72 stars 50 forks source link

Integration of JSON response handling #62

Closed kriszman closed 3 years ago

kriszman commented 3 years ago

@a-schild added the possibility to choose between XML/JSON parsing in order to fix the XML issues we had in #58

I also enhanced the tests related to user provisioning accordingly, but i had some issues with some of the other tests (mainly uploading issues), though they are not related to the changes I did.

a-schild commented 3 years ago

I havent looked into details, but does the API user need to choose between XML and JSON or are we automatically using JSON for this API call?

kriszman commented 3 years ago

the parsing method is chosen automatically using the type of response parser (https://github.com/kriszman/nextcloud-java-api/blob/0b1da4cf92a509950d406bfb1dd2a582c8c5d988/src/main/java/org/aarboard/nextcloud/api/utils/ConnectorCommon.java#L255) via "instanceof" (eg. https://github.com/kriszman/nextcloud-java-api/blob/0b1da4cf92a509950d406bfb1dd2a582c8c5d988/src/main/java/org/aarboard/nextcloud/api/utils/ConnectorCommon.java#L62), so I didn't touch the existing calls

a-schild commented 3 years ago

Thanks for the code, works as intended, will release a new version soon