[Issue 9950] New: std.json should return empty string/array instead of null on empty input

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Apr 17 08:44:05 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=9950

           Summary: std.json should return empty string/array instead of
                    null on empty input
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: pull
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: andrej.mitrovich at gmail.com


--- Comment #0 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2013-04-17 08:44:01 PDT ---
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)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list