We're using Payara 4 which uses Eclipselink Moxy as the default JSON to/from object mapper. We're now looking into switching to Jackson which is more suitable and easy to work with when it comes to JSON.
There is a known issue with Moxy where when it serializing a Map, the JSON will look like this:
"productsPerCost":{"entry":[{"key":"PS4","value":999}, {"key":"TV","value":1233}]}
And Jackson cannot deserialize this, and so it'll fail, because Jackson expect the Map's JSON representation to be:
"productsPerCost": {
"PS4": 999,
"TV": 1233
},
Let's say we'll switch our application to work with Jackson. If we'll call to some external system that is working with Moxy, we'll get this weird JSON from them and fail.
How to handle this?