polygene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Merlin (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (POLYGENE-157) Remove support for legacy Map serialization format.
Date Mon, 16 Jan 2017 08:29:26 GMT

     [ 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)

Mime
View raw message