Skip to content

Resolved '1005: failed to parse JSON' error for special characters #33

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

pengenn
Copy link

@pengenn pengenn commented Jan 15, 2016

This is a code change made from an Infusionsoft team to address a recent issue encountered when attempting the following calls (including, but not limited to these calls) with the Java SDK:

  • Creating an account with endpoint /account/create providing special characters in the name field.

    Providing a name with Latin special characters (e.g. à ȧ) or other signs (e.g. ©™) will result in a failed response with the code "1005" and the description "unable to parse json"

  • Creating a credit card with endpoint credit/card/create providing special characters in the user_name field

    Providing a name with Latin special characters (e.g. à ȧ) or other signs (e.g. ©™) will result in a failed response with the code "1005" and the description "unable to parse json"

We suspect the SDK was not properly encoding the JSON as UTF-8 on transmission, or it is somehow being overwritten when JSON is sent over.

We have been in communication with WePay support, and the following support tickets were made in order to track this particular issue:
829531
835128

We believe the code change provided is a 'possible' solution to the issue, where it encodes all parameters on the JSON object to UTF-8 before transmission. This has been tested on our end with various characters and determined to successfully make the API calls (mentioned above) with special characters, without problems. Please take a look. If you have found a more effective solution, please let us know.

Thank you.

@sankate
Copy link
Contributor

sankate commented Feb 29, 2016

This should have been fixed by pull request #36
Please let us know if you are still getting JSON parse error.

@sankate sankate closed this Feb 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants