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
Implement an instance toString() method on JSONObject #4219
Conversation
http://www.jooq.org/javadoc/latest/ is not very clear about JSONObject taking a map as a parameter in the constructor but calling toString on the resulting object won't return a JSON string. I feel things can be improved by either adding something to the documentation or by having a toString() method which calls toJSONString. This commit implements the latter.
Hmm, interesting. Thanks for the contribution! But instead of improving our version of the library, we might just upgrade to the latest version of JSONSimple, which already includes this change: (discussions about embedding dependencies can be found here, for instance: #3869) |
Upgrading JSONSimple broke our integration tests, so we cannot do that. It might be a good time to think about replacing the dependency entirely by the standard jsonp in jOOQ 4.0 (#4220). I'll merge your pull request as it adds immediate value without any risks. The merge can be done without signing our transfer of rights agreement, as this third-party section of the code is ASL 2.0 only licensed. Thanks again for this contribution! |
[#4219] Implement an instance toString() method on JSONObject
👍 |
Yes, good idea. I didn't even check that |
Done |
http://www.jooq.org/javadoc/latest/ is not very clear about JSONObject
taking a map as a parameter in the constructor but calling toString on
the resulting object won't return a JSON string.
I feel things can be improved by either adding something to the documentation
or by having a toString() method which calls toJSONString. This commit
implements the latter.