4 ms·
I wanted to name it something like "mson" for "minimal-JSON", but that's already taken. EDIT: Not meaning anything is a plus! But I see your point about being
by seagreen 10y ago
I wanted to name it something like "mson" for "minimal-JSON", but that's already taken.
EDIT: Not meaning anything is a plus! But I see your point about being un-googleable.
- pacaro 10y agoASN.1 uses the name DER Distinguished Encoding Rules for this purpose. There are some other edgecases that you aren't considering (or that I missed) Min and Max integer values - JavaScript has some pretty tight limits here Keys should be in lexicographic order — you might want to be more specific. Is there a permitted subset of Unicode? Which normalization rule must be used?
- seagreen 10y agoThere's an issue for min and max number values here: https://github.com/seagreen/Son/issues/3 https://github.com/seagreen/Son/issues/3 Son seems like a natural place to put restrictions on them, but I'm not sure if there's way to do it that (A) still makes for a clean spec and (B) still allows everything floats can encode to to be used.
- pacaro 10y agoYeah, as with the trailing zero, you're being burned by JavaScript's decision to just have a Number type. As far as js is concerned 1 and 1.0 are the same number.
- pacaro 10y agoOn an unrelated note. If human readability isn't a primary concern, I'd recommend requiring that < > & all be escaped, this prevents some crappy attacks Also, no top level lists!
- seagreen 10y agoWhy no top level lists?
- pacaro 10y agoHa! I guess I'm showing my age. There used to be an associated vulnerability, which is why some frameworks won't let you do it. It appears that the vulnerability was fixed in what are now fairly old versions of browsers. More info at http://stackoverflow.com/questions/16289894/is-json-hijacking-still-an-issue-in-modern-browsers http://stackoverflow.com/questions/16289894/is-json-hijackin...
- drewnoakes 10y agoJSCON: JavaScript Canonical Object Notation
- seagreen 10y agoThis is a great name. I'll probably stick with Son because it's already released, but honestly this would have been better.