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

[PATCH] Missing quotes around toString() output when writing an unsupported object. #33

Closed
GoogleCodeExporter opened this issue Aug 5, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. use JSONValue.writeJsonString() or JSONValue.toJsonString() providing a 
value argument of an unsupported type.

What is the expected output? What do you see instead?
 the library already provides a fallback mechanism that outputs value.toString() when passing an unsupported object. This is okay, but i would expect to get surrounding quotes, as when writing normal Strings.

What version of the product are you using?
 trunk (same behavior on 1.1)

The attached patch should solve the issue: it simply uses the same behavior for 
String instances (escape + surrounding quotes), and for the fallback case as 
well.

thanks,
alberto

Original issue reported on code.google.com by sanita.c...@gmail.com on 4 Aug 2010 at 7:13

Attachments:

@GoogleCodeExporter
Copy link
Author

Thanks.

Original comment by fangyid...@gmail.com on 5 Aug 2010 at 12:15

  • Changed state: Duplicate

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