Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
Abhay Yadav
6 years agoExplorer | Level 4
Bad JSON: expected object value. exception while uplaoding a file using dropbox Java SDK
Hi all, I am trying to upload a file using dropbox Java SDK (version 3.1.5). I amgetting file from a ajax form and then trying to upload it but getting the below exception when calling uploadAndF...
Greg-DB
Dropbox Community Moderator
5 years agoFilipRachunek This is a bug in the Java SDK. This is still open with engineering, but I don't have an update on it yet. I'll follow up here once I do.
FilipRachunek
5 years agoExplorer | Level 4
@Greg-DB Thanks for your prompt response. I'll wait for the SDK update.
Filip
- FilipRachunek5 years agoExplorer | Level 4
Hello,
The error is still there, even in version 4.0.0 of the Java SDK.
com.dropbox.core.BadResponseException: Bad JSON: expected object value. at [Source: (String)""; line: 1, column: 1] at com.dropbox.core.DbxRequestUtil.unexpectedStatus(DbxRequestUtil.java:347) ~[dropbox-core-sdk-4.0.0.jar:na] at com.dropbox.core.DbxRequestUtil.unexpectedStatus(DbxRequestUtil.java:324) ~[dropbox-core-sdk-4.0.0.jar:na] at com.dropbox.core.DbxUploader.finish(DbxUploader.java:268) ~[dropbox-core-sdk-4.0.0.jar:na] at com.dropbox.core.DbxUploader.uploadAndFinish(DbxUploader.java:126) ~[dropbox-core-sdk-4.0.0.jar:na] at com.dropbox.core.DbxUploader.uploadAndFinish(DbxUploader.java:96) ~[dropbox-core-sdk-4.0.0.jar:na] at com.dropbox.core.v2.DbxUploadStyleBuilder.uploadAndFinish(DbxUploadStyleBuilder.java:92) ~[dropbox-core-sdk-4.0.0.jar:na]Any chance to fix it soon? I understand that long-lived access tokens will stop working by the end of September 2021, so we'll have to switch to short-lived. However, it's not possible as long as the SDK throws this exception.
- Greg-DB5 years ago
Dropbox Community Moderator
FilipRachunek This issue is still open with engineering, but I don't have an update or timeline right now. I'll follow up here once I do.
- Greg-DB5 years ago
Dropbox Community Moderator
This is fixed in v4.0.1 of the Java SDK.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!