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

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.