RJSON: compress JSON to JSON
cliws.com
RJSON: compress JSON to JSON
1–10 of 45 posts
Re: RJSON: compress JSON to JSON
#2Re: RJSON: compress JSON to JSON
#3 {"users": [
{"first": "Homer", "last": "Simpson"},
{"first": "Hank", "last": "Hill"},
[2, "Peter", "Griffin"]
}Re: RJSON: compress JSON to JSON
#4I see a pretty major problem with this. It seems to depend on the order of key value pairs in object literals being defined. The order is not defined by the JSON or the ecmascript standards. So you can't really depend on the order of keys in a json object, unless you explicitly define some order (like alphabetical, for instance). I like the basic concept of compressing json to json but this is not a particularly good…
Re: RJSON: compress JSON to JSON
#5I see a pretty major problem with this. It seems to depend on the order of key value pairs in object literals being defined. The order is not defined by the JSON or the ecmascript standards. So you can't really depend on the order of keys in a json object, unless you explicitly define some order (like alphabetical, for instance). I like the basic concept of compressing json to json but this is not a particularly good…
[deleted]
Re: RJSON: compress JSON to JSON
#6How would it compress and then decompress the following document? {"users": [ {"first": "Homer", "last": "Simpson"}, {"first": "Hank", "last": "Hill"}, [2, "Peter", "Griffin"] }
{
"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
#7How would it compress and then decompress the following document? {"users": [ {"first": "Homer", "last": "Simpson"}, {"first": "Hank", "last": "Hill"}, [2, "Peter", "Griffin"] }
It comes it to:
{
"users": [
{
"first": "Homer",
"last": "Simpson"
},
[
2,
"Hank",
"Hill"
],
[
0,
2,
"Peter",
"Griffin"
]
]
}Re: RJSON: compress JSON to JSON
#8`Content-encoding: gzip` anyone?
Re: RJSON: compress JSON to JSON
#9I see a pretty major problem with this. It seems to depend on the order of key value pairs in object literals being defined. The order is not defined by the JSON or the ecmascript standards. So you can't really depend on the order of keys in a json object, unless you explicitly define some order (like alphabetical, for instance). I like the basic concept of compressing json to json but this is not a particularly good…
So this:
"users": [
{"first": "Homer", "last": "Simpson"},
{"first": "Hank", "last": "Hill"},
{"first": "Peter", "last": "Griffin"}
],
Becomes: "users": [
["first", "last"],
["Homer", "Simpson"],
["Hank", "Hill"],
["Peter", "Griffin"]
],Re: RJSON: compress JSON to JSON
#10> reduce JSON data size and network traffic when gzip isn't available. For example, in-browser 3D-modeling tools like Mydeco 3D-planner may process and send to server megabytes of JSON-data; `Content-encoding: gzip` anyone?