polygene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Merlin <paulmer...@apache.org>
Subject Re: [jira] [Resolved] (POLYGENE-157) Remove support for legacy Map serialization format.
Date Mon, 03 Apr 2017 08:11:13 GMT
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:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message