<PackageReference Include="NJsonSchema" Version="10.1.4" />

JsonPathUtilities

public static class JsonPathUtilities
Utilities to work with JSON paths.
public const string ReferenceReplaceString = "__referencePath"

Gets the $ref replacement string.

public static string GetJsonPath(object rootObject, object searchedObject)

Gets the JSON path of the given object.

public static string GetJsonPath(object rootObject, object searchedObject, IContractResolver contractResolver)

Gets the JSON path of the given object.

public static IReadOnlyDictionary<object, string> GetJsonPaths(object rootObject, IEnumerable<object> searchedObjects, IContractResolver contractResolver)

Gets the JSON path of the given object.