hasPath

Check if jsonPath exists

  1. bool hasPath(Json json, string path)
    @safe
    bool
    hasPath
    (
    Json json
    ,
    string path
    )
  2. 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