hasPath

Check if jsonPath items exists

  1. bool hasPath(Json json, string path)
  2. bool hasPath(Json json, string[] pathItems)
    @safe
    bool
    hasPath
    (
    Json json
    ,
    string[] pathItems
    )

Examples

auto json = parseJsonString(`{"a":"b", "c":{"d":1}, "e":["f", {"g":"h"}]}`);
assert(json.hasPath(["c", "d"]));

Meta