-
Notifications
You must be signed in to change notification settings - Fork 41
Open
Description
It seems that the deserialiser in SerializersCustomizationCDITest is expecting to see a START_OBJECT of the actual items instead of the actual current JsonValue event which is a START_ARRAY.
This is different to the (imo correct) implementation in the deserialiser of the non-CDI TCK test which expects to see the START_ARRAY.
The reason why I think that START_ARRAY is correct is that only this way we can support more complex scenarios.
The current value to parse is
{ "animals" : [ { "type" : "cat", "cuddly" : true, "age" : 5, "furry" : true, "name" : "Garfield" , "weight" : 10.5}, { "type" : "dog", "barking" : true, "age" : 3, "furry" : false, "name" : "Milo", "weight" : 5.5}, { "type" : "animal", "age" : 6, "furry" : false, "name" : "Tweety", "weight" : 0.5} ] }
But imagine having a more complex JSON:
{
"animals":
{
"size":3,
"values": [ { "type" : "cat", "cuddly" : true, "age" : 5, "furry" : true, "name" : "Garfield" , "weight" : 10.5}, { "type" : "dog", "barking" : true, "age" : 3, "furry" : false, "name" : "Milo", "weight" : 5.5}, { "type" : "animal", "age" : 6, "furry" : false, "name" : "Tweety", "weight" : 0.5} ]
}
}
For this case the jsonParser.next() should imo point at the START_OBJECT just before the 'size' attribute, right?
mkarg
Metadata
Metadata
Assignees
Labels
No labels