Re: [Json] ANN: JSONMinify v1

Phillip Hallam-Baker <hallam@gmail.com> Mon, 31 March 2014 20:35 UTC

Return-Path: <hallam@gmail.com>
X-Original-To: json@ietfa.amsl.com
Delivered-To: json@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 245371A7001 for <json@ietfa.amsl.com>; Mon, 31 Mar 2014 13:35:25 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.399
X-Spam-Level:
X-Spam-Status: No, score=-1.399 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, J_CHICKENPOX_41=0.6, SPF_PASS=-0.001] autolearn=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5djqB4YFtVLk for <json@ietfa.amsl.com>; Mon, 31 Mar 2014 13:35:23 -0700 (PDT)
Received: from mail-lb0-x234.google.com (mail-lb0-x234.google.com [IPv6:2a00:1450:4010:c04::234]) by ietfa.amsl.com (Postfix) with ESMTP id C20D01A6F81 for <json@ietf.org>; Mon, 31 Mar 2014 13:35:22 -0700 (PDT)
Received: by mail-lb0-f180.google.com with SMTP id 10so6278980lbg.11 for <json@ietf.org>; Mon, 31 Mar 2014 13:35:18 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=gjZXIfg/M1u0GCxl4JRzhMS0nfyU1R3dZnlV6vD3wdQ=; b=b7PYb/Pz5iJIUlROiWlD31fpPNNX1WGUC+LpZ0lXG/GhYl4t5ow9gjrucSMKKRsfoO SuJcb6zXqVozT7Lr3lz12jKj54N+f5PnNIE8KuhjIGVeFxSBQww+TsUZ2iQtYbiNO/wY H667K5kyXzEL3RLK8DrTsthvxXxfFtrKQdoguafaMiROucbdTaG1mOBoenK2nkN4y7yw EFvZVRMdG+GXzBuTpzQFF27DcRuf2xlkQJrMfJ+JrY3kqbVk4DS/f3nzMokzyHnU8E6A apgajWs7/3+66E2b5O3/8coqpVXZDe/xDwEJbFgTD/UV7sYvFP7Kvei2vM7zxHH2fAYv m/+w==
MIME-Version: 1.0
X-Received: by 10.112.26.199 with SMTP id n7mr18880004lbg.27.1396298118748; Mon, 31 Mar 2014 13:35:18 -0700 (PDT)
Received: by 10.112.234.229 with HTTP; Mon, 31 Mar 2014 13:35:18 -0700 (PDT)
In-Reply-To: <CF5EF778.40C02%jhildebr@cisco.com>
References: <CAC2-jLEEMX7eS7zrH4RV3rH6vbBpU4w0gcV58Od0_YQD+Tay2A@mail.gmail.com> <CF5EF778.40C02%jhildebr@cisco.com>
Date: Mon, 31 Mar 2014 16:35:18 -0400
Message-ID: <CAMm+Lwjt3r+D0HVEPy3_e=_oh52mMdenp0ZBYasYGEAuqX1Y1Q@mail.gmail.com>
From: Phillip Hallam-Baker <hallam@gmail.com>
To: "Joe Hildebrand (jhildebr)" <jhildebr@cisco.com>
Content-Type: multipart/alternative; boundary="001a113373025e630c04f5ecfd6f"
Archived-At: http://mailarchive.ietf.org/arch/msg/json/Ls2VHVJ3Mjpnka0L4h_Lt2QZ6yo
Cc: Stefan Reich <stefan.reich.maker.of.eye@googlemail.com>, "json@ietf.org" <json@ietf.org>
Subject: Re: [Json] ANN: JSONMinify v1
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: "JavaScript Object Notation \(JSON\) WG mailing list" <json.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/json>, <mailto:json-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/json/>
List-Post: <mailto:json@ietf.org>
List-Help: <mailto:json-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/json>, <mailto:json-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 31 Mar 2014 20:35:25 -0000

JSON+C is liable to be confusing with JSON-C (compressed) which I am
already working on:
http://datatracker.ietf.org/doc/draft-hallambaker-jsonbcd/

Could it be JSON-A instead (Augmented) ?

Then I can add it into the suite.


The idea of an encoding of the JSON data model that is more suited to hand
input is appealing. In particular we could make use of it for configuration
files instead of XML. In fact many servers already use something of the
sort.

For example, imagine that the configuration file in JSON is:

{"Service" : {"Name" : "server1.example.com",
"Port" : 80,
"Protocol" : "HTTP" }}

Thats OK but painful to type and no comments makes it unusable for admin.
But we can add in:

{"Service" : {"Name" : "server1.example.com",  // Has not been assigned yet
"Port" : 80,     // Default port for HTTP
"Protocol" : "HTTP" }} // well duh, its a WEB server

But most folk would prefer:

Service : {
  Name : "server1.example.com"  // Has not been assigned yet
  Port : 80     // Default port for HTTP
  Protocol : "HTTP" } // well duh, its a WEB server

The only difference here is that the quotes are made optional on the tag
IFF this is unambiguous and LF or CRLF can be used in place of a comma. For
technical reasons it is probably simpler to make this an option for any
string that does not include a space character:

Service : {
  Name : server1.example.com  // Has not been assigned yet
  Port : 80     // Default port for HTTP
  Protocol : HTTP
  Description : "Need quotes for this though" } // well duh, its a WEB
server



On Mon, Mar 31, 2014 at 12:44 PM, Joe Hildebrand (jhildebr) <
jhildebr@cisco.com> wrote:

> Oops.  I replied directly, rather than to the list.  Stefan, please reply
> to this one.
>
> On 3/29/14, 11:41 AM, "Stefan Reich"
> <stefan.reich.maker.of.eye@googlemail.com> wrote:
>
> >I think you might be an evil organisation. But I am not afraid... not
> >anymore! :-))
>
> We're just people.  Please assume we're just flawed the way most people
> are, not *inherently* evil.
>
> >JSONMinify <http://jsonminify.tinybrain.de
> ><http://jsonminify.tinybrain.de/>> is a Java library
> >THAT WORKS (see below) that removes whitespace and comments from
> >JSON/JSON+C documents (JSON+C = JSON with comments).
>
> Do you have a definition of the JSON+C syntax written up yet?
>
> --
> Joe Hildebrand
>
>
>
>
>
> _______________________________________________
> json mailing list
> json@ietf.org
> https://www.ietf.org/mailman/listinfo/json
>



-- 
Website: http://hallambaker.com/