Attempts to create a filter from a string.
public static JsonFilter? TryParse(string? value)
| parameter | description |
|---|---|
| value | The string. |
The corresponding filter, or null.
A filter string is one or more JSON paths separated by commas. Each JSON path is one or more property names separated by periods. A JSON path prefixed with an exclamation point is excluded rather than included. If no JSON paths are found, this method returns null.
Attempts to create a filter from a string.
public static JsonFilter? TryParse(string? value, string? rootPath)
| parameter | description |
|---|---|
| value | The string. |
| rootPath | The root path. |
The corresponding filter, or null.
This overload automatically prefixes each JSON path with the specified root path, if specified.