I am working on BoxSDK Java and I am attempting to capture the response from BoxSearch. As shown in their sample code:
https://developer.box.com/guides/search/
I am unable to capture the JSON response from searchResults. If I print this as toString it will shows PartialCollection object. And If I print it as Array(or Arrays.toString(searchResults) it will print me BoxItem.Info object.
I also tried using a different library like GSON, but it was giving me
java. Lang. IllegalArgumentException: class com.box.sdk.BoxUser$Info declares multiple JSON fields named login at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:170)
When I check the BoxSearch code in github I can see they are parsing it via jsonArray but it seems not the case.
Can you suggest me what I might be doing wrong?
My ideal outcome would be something like below (Used developer box Api Try me):
I.e.
{
"total count": 2,
"entries":
"type": "file",
"id": "1234567890",
"etag": "7",
"name": "test.paf",
"shared link": (
"url": https://box.com/s/<random>"
"download_url", "https://box.com/shared/static/<random>"
"vanity _urd": null,
"vanity_ name": null,
"effective access": "collaborators",
"effective _permission": "can preview"
"is _password enabled"; false,
"unshared at"; null,
"download count"; 1,
"preview count": 0,
"access": "collaborators"
"permissions": (
"can preview": true,
"can download": false,
"can edit": false
].
"tags": [
"NoClue"
GET
"type": "file",
"id": "1177053766282",
"etag": "1",
"name"; "Tester.doc"
“shared_link"…
Steps and expectations have been mentioned above