Skip to content
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

JsonWriter not working as expected for single string input; works for other types #16

Open
GoogleCodeExporter opened this issue Nov 21, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. conversion of String "123" to json using JsonWriter.objectToJson(str) 
returns "123"
2. so, conversion to a String object using JsonReader.jsonToJava("123") fails 
with:

java.io.IOException: Input is invalid JSON; does not start with '{' or '[', c=34
Last read: "

What is the expected output? What do you see instead?
I'm guessing that the writer is expected to output something along the lines:
{"@type":"string","value":"123"}.
This works, though returns an array, which isn't what I want:
["123"]
As does this:
{"@type":"string","value":["123"]}

What version of the product are you using? On what operating system?
Latest. Windows 8.

Please provide any additional information below.
JDK 6

Original issue reported on code.google.com by [email protected] on 4 Apr 2014 at 4:49

@GoogleCodeExporter
Copy link
Author

I have a headache.

Original comment by [email protected] on 21 Jun 2014 at 8:55

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant