Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

Invalid numbers parsed #1101

Open
eleumik opened this issue Mar 24, 2017 · 0 comments
Open

Invalid numbers parsed #1101

eleumik opened this issue Mar 24, 2017 · 0 comments
Labels
Milestone

Comments

@eleumik
Copy link

eleumik commented Mar 24, 2017

The following invalid Json numbers are parsed as numbers by fastjson:

034 parsed as 34, instead is invalid JSON, some other implementations parse it as an octal 28 that is what javascript would do. Same for -034. See http://stackoverflow.com/a/27361596/1536382

0., invalid for JSON, parsed as 0 like javascript would do, note that .0 is treated as an error (also invalid for JSON while for js is also ok), so for consistency also 0. should be, IMHO. If there is a way of doing relaxed-parsing may be both should be allowed in that case.

See also http://deron.meranda.us/python/comparing_json_modules/numbers#t5-3 (today unavailable, cached)

See same issues for genson owlike/genson#111 and boon advantageous/boon#22

@wenshao wenshao added the bug label Mar 24, 2017
@wenshao wenshao modified the milestones: 1.2.30, 1.2.31 Mar 24, 2017
@wenshao wenshao modified the milestones: 1.2.32, 1.2.31 Apr 3, 2017
@wenshao wenshao modified the milestones: 1.2.33, 1.2.32 May 8, 2017
@wenshao wenshao modified the milestones: 1.2.34, 1.2.33 Jun 11, 2017
@wenshao wenshao modified the milestones: 1.2.35, 1.2.34 Jul 2, 2017
@wenshao wenshao modified the milestones: 1.2.36, 1.2.35 Jul 16, 2017
@wenshao wenshao modified the milestones: 1.2.37, 1.2.36 Jul 29, 2017
@wenshao wenshao modified the milestones: 1.2.38, 1.2.37 Aug 16, 2017
@wenshao wenshao modified the milestones: 1.2.39, 1.2.38 Sep 1, 2017
@wenshao wenshao modified the milestones: 1.2.39, 1.2.40 Oct 1, 2017
@wenshao wenshao modified the milestones: 1.2.40, 1.2.41 Nov 4, 2017
@wenshao wenshao modified the milestones: 1.2.41, 1.2.42 Nov 17, 2017
@wenshao wenshao modified the milestones: 1.2.42, 1.2.43, 1.2.x Dec 11, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants