minimal-json icon indicating copy to clipboard operation
minimal-json copied to clipboard

Added Json.value(object) Method and JsonSerializable Interface

Open pbi-qfs opened this issue 7 years ago • 4 comments

To create JsonValues directly from complex java objects. Extends PR #80

pbi-qfs avatar Jun 01 '17 10:06 pbi-qfs

@pbi-qfs why would char[] objects become JSON strings? Seems counter-intuitive, even though the conversion always works. This is creating a single exception to the "an array goes in, an array comes out" pattern.

bernardosulzbach avatar Jun 01 '17 18:06 bernardosulzbach

@mafagafogigante you're right, maybe I wrote to much eclipse compiler stuff, so in my head, char[] and Strings became equal...

I gladly changed this, so the API is more consistent.

pbi-qfs avatar Jun 01 '17 20:06 pbi-qfs

I understand, but the library should not cause surprises. And while a string is a string, a char[] is an array.

I don't think I will use this stuff anytime soon, but I understand that there might be use cases for it.

Additionally, it has improved a lot from your initial proposal. As long as it doesn't degrade parsing performance (which it doesn't), I am OK with it. Good luck.

bernardosulzbach avatar Jun 01 '17 21:06 bernardosulzbach

@mafagafogigante Thanks for your review and your positive vote.

@ralfstx Anything missing for a merge?

pbi-qfs avatar Jun 02 '17 07:06 pbi-qfs