folly::compareJsonWithNestedJson

Like compareJson, but if strNestingDepth > 0 then contained strings that are valid JSON will be compared using compareJsonWithNestedJson(str1, str2, strNestingDepth - 1).

Synopsis

Declared in <folly/json/JsonTestUtil.h>

bool
compareJsonWithNestedJson(
    StringPiece json1,
    StringPiece json2,
    unsigned int strNestingDepth);

Return Value

True if both strings represent the same document.

Parameters

NameDescription
json1The first JSON string.
json2The second JSON string.
strNestingDepthHow many levels of JSON-in-string to compare.