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

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.