Error deserializing json with : in keys
Brought to you by:
charliehubbard
There is a problem with use flexjson to deserialize json strings like that:
http://open-services.net/bin/view/Main/CmJsonFormatV1?sortcol=table;up=#Collections
I tried to deserialize it in parts using this code attached.
But flexjson replace the caracter ':' of KEYS to '=' and it make erros in second deserialize.
I posted this item as a nobody by mistake. Charlie, I'll monitor this item if you have questions.
I did debug the parser and found it wasn't manipulating the keys in anyway in 2.0, and the keys and data were correct.
I did successfully deserialize this object into a Map using the following code:
Map<String,Object> page2 = new JSONDeserializer<Map<String,Object>>() .deserialize( json );
List results = page2.get("oslc_cm:results");
assertEquals( "http://localhost:9080/results/3", page2.get("oslc_cm:next") );
You don't have to deserialize this again to get the List object contained within. So I think this is operator error.