You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@polygene.apache.org by "Paul Merlin (JIRA)" <ji...@apache.org> on 2017/01/16 08:29:26 UTC

[jira] [Updated] (POLYGENE-157) Remove support for legacy Map serialization format.

     [ https://issues.apache.org/jira/browse/POLYGENE-157?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul Merlin updated POLYGENE-157:
---------------------------------
    Assignee: Paul Merlin

To clarify, 2.x do not serialize maps to simple json objects. ValueSerialization has an option allowing the consumer to choose how maps are (de)serialized.

Here's how we can do it properly and without "options":

Serialize Map<String, ?> to { "abc":"def" }
Serialize Map<?, ?> to [ { "key":"abc", "value":"def" } ]

Detect json object vs. array on deserialization and support both.

That way we use the simple format for simple cases but also support Maps with complex keys.

> Remove support for legacy Map serialization format.
> ---------------------------------------------------
>
>                 Key: POLYGENE-157
>                 URL: https://issues.apache.org/jira/browse/POLYGENE-157
>             Project: Polygene
>          Issue Type: Task
>            Reporter: Niclas Hedhman
>            Assignee: Paul Merlin
>
> In Qi4j 1.x, we serialized the Maps as
> [
>     { "key":"abc", "value":"def" )
> ]
> which in 2.x became
> {
>     "abc":"def"
> }
> We should remove the old format to make the code cleaner and less confusing.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)