3 ms·
There'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
by seagreen 10y ago
There'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...