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

JsonPathUtilities

public static class JsonPathUtilities
Utilities to work with JSON paths.
public static string GetJsonPath(object rootObject, object searchedObject)

Gets the JSON path of the given object.