Subject: [Json] ANN: JSONMinify v1

From: Stefan Reich <[email-masked]>
Date: Sat, 29 Mar 2014 18:41:04 +0100

Hello "IETF"!

I think you might be an evil organisation. But I am not afraid... not
anymore! :-))

Now to everyone, and to the post: There is a new tool, and a new campaign.
The campaign is called JSON+C, and the tool is JSONMinify. (The bigger
universe behind that is called TinyBrain.)

JSONMinify <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). The implementation has *no
overhead and near-perfect performance*.

JSONMinify *makes it possible to use JSON+C everywhere* regular JSON is
expected--with a very cheap conversion. Actually, prepending JSONMinify will
even SPEED UP your JSON parser (if it's a slow one).

Usage is quite simple:

    String minified = prophecy.common.JSONMinify.minify(originalJSONString);

Note: We'll collect implementations in any other language too - just submit
if you have one.

Note note: I wrote JSONMinify because the other minifiers (notably, the one
at bigaqua.org <http://bigaqua.org/minify_json.html> which still turns out
high at Google), sadly, JUST DON'T WORK.
Link: http://jsonminify.tinybrain.de

Looking for feedback... cheers and have a great summer!! :o))
Stefan

---

From: "Joe Hildebrand (jhildebr)" <[email-masked]>
Date: Mon, 31 Mar 2014 16:44:31 +0000

Oops.  I replied directly, rather than to the list.  Stefan, please reply
to this one.

>I think you might be an evil organisation. But I am not afraid... not

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

---

From: Phillip Hallam-Baker <[email-masked]>
Date: Mon, 31 Mar 2014 16:35:18 -0400

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) <
[email-masked]> wrote:

> _______________________________________________
> json mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/json
>

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