Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 991D6200C34 for ; Mon, 27 Feb 2017 15:52:49 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 97A87160B60; Mon, 27 Feb 2017 14:52:49 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id E14F7160B56 for ; Mon, 27 Feb 2017 15:52:48 +0100 (CET) Received: (qmail 33604 invoked by uid 500); 27 Feb 2017 14:52:48 -0000 Mailing-List: contact dev-help@polygene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@polygene.apache.org Delivered-To: mailing list dev@polygene.apache.org Received: (qmail 33593 invoked by uid 99); 27 Feb 2017 14:52:48 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Feb 2017 14:52:48 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id A41C718E852 for ; Mon, 27 Feb 2017 14:52:47 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -2.347 X-Spam-Level: X-Spam-Status: No, score=-2.347 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-2.999, SPF_NEUTRAL=0.652] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id TK__VRGe3l1B for ; Mon, 27 Feb 2017 14:52:47 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id AC41F5F23A for ; Mon, 27 Feb 2017 14:52:46 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 01F75E0630 for ; Mon, 27 Feb 2017 14:52:46 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 5E8BB24138 for ; Mon, 27 Feb 2017 14:52:45 +0000 (UTC) Date: Mon, 27 Feb 2017 14:52:45 +0000 (UTC) From: "Paul Merlin (JIRA)" To: dev@polygene.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (POLYGENE-157) Remove support for legacy Map serialization format. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 27 Feb 2017 14:52:49 -0000 [ https://issues.apache.org/jira/browse/POLYGENE-157?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15885885#comment-15885885 ] Paul Merlin commented on POLYGENE-157: -------------------------------------- I ended up with the following: When serializing a Map, if all its keys are serialized to String, then serialize the Map as a simple object. Otherwise, serialize the Map as an array of entry objects. When deserializing a Map, detect both formats. In other words, Map, Map and EnumMap will be serialized as simple objects because their keys end up as Strings when serialized. On the other hand, Map and Map will be serialized as arrays of entry objects because their keys do not end up as Strings when serialized. > 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 > Fix For: 3.0 > > > 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.15#6346)