Bug 9950 – std.json should return empty string/array instead of null on empty input

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-04-17T08:44:00Z
Last change time
2013-04-17T08:44:15Z
Keywords
pull
Assigned to
nobody
Creator
andrej.mitrovich

Comments

Comment #0 by andrej.mitrovich — 2013-04-17T08:44:01Z
These should pass: auto str = parseJSON(`""`).str; assert(str !is null); assert(str == ""); auto arr = parseJSON(`[]`).array; assert(array !is null); assert(array.length == 0)
Comment #1 by andrej.mitrovich — 2013-04-17T08:44:15Z