d3x0r / JSON6

JSON for Humans (ES6)
Other
237 stars 15 forks source link

should support new octal prefix 0o #11

Closed hax closed 6 years ago

hax commented 6 years ago

As title.

And I suggest do not allow 0 prefix because ES6+ and ES5 strict mode do not allow it any more.

d3x0r commented 6 years ago

It does. Although 0 prefix is apparently broken. This is a documentation issue....

d3x0r commented 6 years ago

For the javascript version I really just take the collected characters of a number and feed it through Number(val.string). So whatever javascript does is what this does; other than if a leading 0 I stuff a 'o' now... which I'm debating about before publishing.