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 12C7C18D71 for ; Mon, 24 Aug 2015 11:55:04 +0000 (UTC) Received: (qmail 53289 invoked by uid 500); 24 Aug 2015 11:54:51 -0000 Delivered-To: apmail-camel-dev-archive@camel.apache.org Received: (qmail 53244 invoked by uid 500); 24 Aug 2015 11:54:51 -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 53230 invoked by uid 99); 24 Aug 2015 11:54:50 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Aug 2015 11:54:50 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 72094C0861 for ; Mon, 24 Aug 2015 11:54:50 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.121 X-Spam-Level: X-Spam-Status: No, score=-0.121 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id GLUeaXJvm6jH for ; Mon, 24 Aug 2015 11:54:49 +0000 (UTC) Received: from mail-la0-f49.google.com (mail-la0-f49.google.com [209.85.215.49]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id 68E1B20F6D for ; Mon, 24 Aug 2015 11:54:49 +0000 (UTC) Received: by labgv11 with SMTP id gv11so7866305lab.2 for ; Mon, 24 Aug 2015 04:54:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=cRRHEb50bjUW8tzz5VkwNcsudFd0mV1joS/vlNVrkNc=; b=RpanPwvXJ22yfKfdjizeZ7e4Ve6yfmvk2s/NvUC7hI8M0Sd1P8GLqcppDCNl9bmXWr E+DTpzfYx5RhpxF+djwhhV3UPrN2RrN83K543bwNnkwLY7fyBTYPXHd+WISypBTpxZ6v NkdFEgIFZVJ2pm3SOpYfuMeE1Itl0XEc3Jc0Fw0FZVLvYZ+UhJM+dorUHminQznVwVt1 /fmcUSpWiw0O352t974exYTmchkBrArLWeV2uWIfH4S0lqKxjokTZfdv5KMHyyGJcJjf JN8hLHGQ/uxYG/2tl+8rAdylxvmn2LcjPb5LY7i8dmXYKCjTFWmjvFW7VFhTb1iM40wA w3DA== MIME-Version: 1.0 X-Received: by 10.112.63.138 with SMTP id g10mr5002467lbs.106.1440417287669; Mon, 24 Aug 2015 04:54:47 -0700 (PDT) Received: by 10.25.43.131 with HTTP; Mon, 24 Aug 2015 04:54:47 -0700 (PDT) Date: Mon, 24 Aug 2015 13:54:47 +0200 Message-ID: Subject: Usefulness of the current Map or List to String conversion in Camel From: Aki Yoshida To: "dev@camel.apache.org" Content-Type: text/plain; charset=UTF-8 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"="peach", "taste"="sweet", you get {name=peach, taste=sweet} 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