Hi Kean

You can write a message body reader/writer to handle org.json.


Le mar. 16 oct. 2018 20:50, Kean Erickson <[email protected]> a
écrit :

> Although the javax.json.JsonObject API at is now meant to be used instead,
> it's interesting that org.json.JSONObject is properly deserialized in
> JAX-RS. The only catch is that every json object nested inside is itself
> nested as a value with a key called "map", such that if I had a structure
> like this:
>
> "a" : { "b" : "c" }
>
> ...the resulting output would be:
>
> "a" : { "map" : {"b": "c"} }
>
> The org.simple.JSONObject library would be completely usable for this
> purpose if not for this one strange addition. I'm wondering where this
> behavior originates, or the simplest way to change it?
>
> I'm aware that the json processing API is meant to be used instead, but I
> find it to be fairly inflexible compared to JSONObject for a few reasons,
> so I'd prefer to use the latter if possible.
>
> Thanks,
> -Kean
>

Reply via email to