QUEry, URL-Encodable ECMAScript Object Notation
Online live compiler | Implementations
QUESON is a URL-friendly alternative notation for JSON.
This JSON:
{
"Hello!": ["It looks", "like this."],
"Kind of weird": {
"but better than": "the alternative!"
}
}
which minified and URL-encoded looks like this:
%7B%22Hello%21%22%3A%5B%22It%20looks%22%2C%22like%20this.%22%5D%2C%22Kind%20of%20weird%22%3A%7B%22but%20better%20than%22%3A%22the%20alternative%21%22%7D%7D
in QUESON, looks like this instead:
X.w.Hello!.w-I.w.It_looks.w_w.like_this...w.I_w.Kind_of_weird.w-X.w.but_better_than.w-w.the_alternative!.w.X.X
w. .w (because w kind of looks like ").I. .I (because I kind of looks like [ and ]), with elements separated by _.X. .X (because X kind of looks like { and }), with keys separated from values by -, and properties separated by _._; the escape character is ..There’s a PEG.js grammar that produces a JSON string that serves as spec:
There are multiple alternatives for URL-friendly JSON representations:
QUESON is different because: