[Issue 12784] New: Add an "in" operator for std.json.JSONValue

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed May 21 14:16:20 PDT 2014


https://issues.dlang.org/show_bug.cgi?id=12784

          Issue ID: 12784
           Summary: Add an "in" operator for std.json.JSONValue
           Product: D
           Version: D2
          Hardware: x86
                OS: Mac OS X
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: Phobos
          Assignee: nobody at puremagic.com
          Reporter: markisaa at umich.edu

Currently the only way to check if a JSONValue (that is of type
JSON_TYPE.OBJECT) contains a particular key/property is to wrap opIndex with a
try catch block. This feels horribly clumsy. We should have an opBinaryRight
"in" operator to allow checking without throwing.

Expect a pull request with the "fix" by end of day.

--


More information about the Digitalmars-d-bugs mailing list