dogeon icon indicating copy to clipboard operation
dogeon copied to clipboard

DSON numbers should be octal, not decimal

Open petedmarsh opened this issue 11 years ago • 0 comments

DSON number should be parsed and serialized as octal numbers (including those in exponential format).

From the spec:

such "foo" is 42, "bar" is 42very3 wow    // {"foo": 34, "bar": 17408}

At the moment dogeon leaves numbers in base 10, e.g.:

dson.loads('such "foo" is 42, "bar" is 42very3 wow')
#=> {"foo": 42, "bar": 42000}

This is actually the behavior most, if not all, DSON parsers/serializers have as it was a little unclear in the spec until recently :)

petedmarsh avatar Feb 24 '15 18:02 petedmarsh