News for hackers. Stuff that matters.
Re:RJSON: compress JSON to JSON by perfunctory on Tuesday June 05, 2012 @09:10AM (#4068465)
How would it compress and then decompress the following document?

  {"users": [
    {"first": "Homer", "last": "Simpson"},
    {"first": "Hank", "last": "Hill"},
    [2, "Peter", "Griffin"]
  }
Re:RJSON: compress JSON to JSON by asdfaoeu on Tuesday June 05, 2012 @09:24AM (#4068520)

    {
        "users": [
            {
                "first": "Homer",
                "last": "Simpson"
            },
            [
                2,
                "Hank",
                "Hill"
            ],
            [
                0,
                2,
                "Peter",
                "Griffin"
            ]
        ]
    }
There was a tester linked from the site. Looks like he added the [0, to handle that case.
Re:RJSON: compress JSON to JSON by dogada on Tuesday June 05, 2012 @10:37AM (#4068785)
Yeah, for arrays with first numeric value is reserved schema with index 0. You can see more examples in the unit tests: https://github.com/dogada/RJSON/blob/master/test/tests.js
Re:RJSON: compress JSON to JSON by jerf on Tuesday June 05, 2012 @11:01AM (#4068896)
Unit test suggestion: testPackAndUnpack should also check double-compress and double-decompress for being identical, it'll tend to find any remaining such issues, if any.
Re:RJSON: compress JSON to JSON by dogada on Tuesday June 05, 2012 @12:59PM (#4069484)
Re:RJSON: compress JSON to JSON by judofyr on Tuesday June 05, 2012 @09:24AM (#4068521)
There's a demo here: http://www.cliws.com/p/rjson/

It comes it to:

    {
      "users": [
        {
          "first": "Homer",
          "last": "Simpson"
        },
        [
          2,
          "Hank",
          "Hill"
        ],
        [
          0,
          2,
          "Peter",
          "Griffin"
        ]
      ]
    }