-
Notifications
You must be signed in to change notification settings - Fork 115
Open
Description
The documentation to Unknonw Types states that the default is LinkedHashMap. Aktually a JsonObject is returned. JsonObject used to extend LinkedHashMap in 4.19.1 but since 4.19.2 implements Map
String json = "{\"test\":{}}";
ReadOptions options = new ReadOptionsBuilder().build();
System.out.println(json);
System.out.println("getUnknownTypeClass: "+ options.getUnknownTypeClass());
Object objects = JsonIo.toObjects(json,options, Object.class);
System.out.println(objects);
Results in
{"test":{}}
getUnknownTypeClass: null
JsonObject(id:-1, type:java.util.Map, target:null, line:0, col:0, size:1)
with unknownTypeClass(LinkedHashMap.class)
{"test":{}}
getUnknownTypeClass: class java.util.LinkedHashMap
{test={}}
the same behaivor is with an unknown @type
and failOnUnknownType(false)
Metadata
Metadata
Assignees
Labels
No labels