-
-
Notifications
You must be signed in to change notification settings - Fork 192
Description
Environment
- Nuget Package: JsonPath.Net
- Nuget Version: 0.4.0
- OS: dotnetFiddle/Linux
- .Net Target:
Can this library make doing something simpler?
I'd like to be able to generate a correct JSON Path and/or JSON Pointer from a System.Text.Json.Nodes.JsonNode type.
Describe alternatives you've considered
Post a bug report to dotnet/runtime.
Additional context
Json path generated by BCL's JsonNode.GetPath() for a property like $id is invalid and fails to be parsed by JsonPath.
I'd like to have some (extension?) methods that provide a valid JsonPath and JsonPointer given a JsonNode. It seems to already be mostly done within the code of this library, but is not available via public API. It can return a plain string, or a strongly typed parsed instance of path or pointer.
A dotnet fiddle to illustrate the issue: https://dotnetfiddle.net/vkcQQ8