Bug 10776 – std.json parseJSON has a bug.

Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
x86
OS
Linux
Creation time
2013-08-08T06:03:00Z
Last change time
2014-04-24T20:06:15Z
Assigned to
nobody
Creator
khurshid.normuradov

Comments

Comment #0 by khurshid.normuradov — 2013-08-08T06:03:13Z
I think that, this code must be throw, but it's success run. import std.json; import std.stdio : writeln; void main() { ////////////////////////// leading spaces doesn't skip between 1 and E. auto json = parseJSON(`{ "throwable_one" : 1 .E +1 }`); writeln( toJSON(&json) ); }
Comment #1 by hsteoh — 2013-08-17T09:47:56Z
This violates RFC 4627 (http://www.ietf.org/rfc/rfc4627.txt), so it's definitely a bug in std.json.
Comment #2 by andrej.mitrovich — 2014-04-24T20:06:15Z
This now throws an exception.