Return-Path: X-Original-To: apmail-camel-dev-archive@www.apache.org Delivered-To: apmail-camel-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4C07C18677 for ; Mon, 24 Aug 2015 14:37:53 +0000 (UTC) Received: (qmail 93322 invoked by uid 500); 24 Aug 2015 14:37:53 -0000 Delivered-To: apmail-camel-dev-archive@camel.apache.org Received: (qmail 93281 invoked by uid 500); 24 Aug 2015 14:37:53 -0000 Mailing-List: contact dev-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list dev@camel.apache.org Received: (qmail 93268 invoked by uid 99); 24 Aug 2015 14:37:52 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Aug 2015 14:37:52 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 5A34B1AAC44 for ; Mon, 24 Aug 2015 14:37:52 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.651 X-Spam-Level: *** X-Spam-Status: No, score=3.651 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=3, KAM_INFOUSMEBIZ=0.75, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id S02nfdxQUnra for ; Mon, 24 Aug 2015 14:37:46 +0000 (UTC) Received: from mail-la0-f50.google.com (mail-la0-f50.google.com [209.85.215.50]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTPS id 206E742B59 for ; Mon, 24 Aug 2015 14:37:46 +0000 (UTC) Received: by lalv9 with SMTP id v9so78739374lal.0 for ; Mon, 24 Aug 2015 07:37:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :content-type; bh=+gdk6YvUsLYo3LCBrayaKeY8QEJ0/tkjtZ+ZqGVeMJQ=; b=uXZdzOa5Zh5HIF0J1WPQGC2SCs1xWqxA1SukOJzGYAz3uaHILdLLvFJdL9mIFTboxJ 8LTSwSamQBA5Opb1PXk0kEVjiJAAmFXT7KD5NywKsAu52rNFJJJ4lBcDaTwg92XM2MCA 6eWZyn4sP+PYPR/tVq86cIhqJMBGQYSkwYwkKB2V6GGpVhxgPuEQtXGb+XIlbhQsDsrm CbwnjUjNhvC341MuReOg71UD/O4ABWlgL5LDqhOcgKeGE7OkJDLVb36DJDMyVE5LHr26 fOxk8uvYkdCQf7ZH78CJ5NHZCW0N5NJJ8DMwm1d6aRie/7hWW9myLrOs/dKku1/7DL1e qjzQ== X-Received: by 10.152.120.38 with SMTP id kz6mr15533194lab.58.1440427064868; Mon, 24 Aug 2015 07:37:44 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Henryk Konsek Date: Mon, 24 Aug 2015 14:37:35 +0000 Message-ID: Subject: Re: Usefulness of the current Map or List to String conversion in Camel To: "dev@camel.apache.org" Content-Type: multipart/alternative; boundary=089e0122aefa86c456051e0f8f22 --089e0122aefa86c456051e0f8f22 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable +1 Actually we could remove toString() conversion at all, as it is useless from the message handling point of view. Instead we could add the proper conversions to the jackson or gson modules. Cheers! pon., 24.08.2015 o 13:54 u=C5=BCytkownik Aki Yoshida na= pisa=C5=82: > Hi, > Currently, the default conversion from Map or List to String is based > on the JDK's default serialization. So, if you have a map having > entries "name"=3D"peach", "taste"=3D"sweet", you get > > {name=3Dpeach, taste=3Dsweet} > > This representation is somewhat useless except for the logging > purpose. This format does not handle special characters and it is not > interoperable. So, I am wondering if we can instead use JSONObject's > default serialization so that you will get instead > > {"name":"peach","taste":"sweet"} > > This string is interoperable and can be easily processed. > > If this conversion works directly (we could make it enabled or > disabled using a property), I think that will be very practical for > generic map and list objects. > > Comments appreciated. > > regards, aki > --=20 Henryk Konsek http://about.me/hekonsek --089e0122aefa86c456051e0f8f22--