PDA

View Full Version : JSON Jackson question ...



gbayfield
Aug 17th, 2010, 10:25 AM
A JSON question using a {"animal":"age"} object as an example;
A Strict JSON array is say
[{"animal":"cat","age":3},{"animal":"dog","age",4}]
Is there any way to to do
[{"cat",3},{"dog",4}] and have Jackson parse this ?

gbayfield
Aug 17th, 2010, 11:58 AM
Found a way myself ->
For succinct JSON payloads with no wasteful name fields for passing logical objects...
this wont work [{"cat",3},{"dog",5}]
but [["cat",3],["dog",5]] does !