Paul Merlin a écrit : > Niclas Hedhman a écrit : >> Q; This "if keys are Strings", do you iterate through them or do you use >> ParameterizedType ? > > All keys must be a character or a sequence of characters: > https://github.com/apache/polygene-java/blob/develop/core/spi/src/main/java/org/apache/polygene/serialization/javaxjson/JavaxJsonSerializer.java#L213-L215 > > I'll add specific coverage for that.
The thing with maps with mixed key types is that we can't always deserialize them, MapType<Object, ?> is not enough. It will work with mixed value composite types thanks to _type, but won't if you e.g. mix LocalDateTime and value composites as keys. In the latter case we will fail with "Don't know how to deserialize Object from [json]". See the coverage I just added: https://github.com/apache/polygene-java/blob/develop/extensions/serialization-javaxjson/src/test/java/org/apache/polygene/serialization/javaxjson/JavaxJsonCollectionSerializationTest.java#L67
