Live data from Hacker News

RJSON: compress JSON to JSON

cliws.com

41–45 of 45 posts

Re: RJSON: compress JSON to JSON

#41
post #33

It's all fun until someone loses an eye. What if i look at your API output and assume it's json (only got unique items) but it's rjson? Or whatever? The most important thing when adding another layer to a protocol is identification. So, please, put the whole altered object into a rjson root node so it's clear what we're dealing with.

Correct me if I'm wrong, but isn't this what Content-type is for?

[deleted]

Re: RJSON: compress JSON to JSON

#42

dogada, do you have any results showing both size reduction, and speed of compression/decompression vs. other methods?

On algorithmic level compression is mainly identical to JSONH. I didn't do performance tests yet, I still have ideas how to improve RJSON.

Re: RJSON: compress JSON to JSON

#43
post #40
post #33

It's all fun until someone loses an eye. What if i look at your API output and assume it's json (only got unique items) but it's rjson? Or whatever? The most important thing when adding another layer to a protocol is identification. So, please, put the whole altered object into a rjson root node so it's clear what we're dealing with.

I agree that identification is important issue, but IMO it's protocol level issue. RJSON is not protocol, it's algorithm. Someone will prefer to wrap all in {"rjson": ...}, someone like {"format": "rjson", "data": ...} and so on. I belive, algorithm itself should create as less limitations as possible.

The MIME type is allowed to add information about the nature of the data encoded on top of the encoding. This is why we have application/xhtml+xml. It means "this is encoded using xml, and btw the parsed xml structure is xhtml".

The ideal place to handle this is (as pointed out above) content negociation - specifically as 'application/rjson+json'

Re: RJSON: compress JSON to JSON

#44
post #27

Earlier quoted context omitted.

hey look, I found this http://research.microsoft.com/en-us/projects/jszap/

They are using gzip compression level 1. Bogus.

Are you referring to the graph, in which they set the gzip compression as "1" in order to clearly show the ratio of compression improvement that their technique has over gzip?

Re: RJSON: compress JSON to JSON

#45
post #40
post #33

It's all fun until someone loses an eye. What if i look at your API output and assume it's json (only got unique items) but it's rjson? Or whatever? The most important thing when adding another layer to a protocol is identification. So, please, put the whole altered object into a rjson root node so it's clear what we're dealing with.

I agree that identification is important issue, but IMO it's protocol level issue. RJSON is not protocol, it's algorithm. Someone will prefer to wrap all in {"rjson": ...}, someone like {"format": "rjson", "data": ...} and so on. I belive, algorithm itself should create as less limitations as possible.

It's an algo. But the resulting data is a protocol.
Post reply on HN