TLio.Json.SystemText
1.2.0
See the version list below for details.
dotnet add package TLio.Json.SystemText --version 1.2.0
NuGet\Install-Package TLio.Json.SystemText -Version 1.2.0
<PackageReference Include="TLio.Json.SystemText" Version="1.2.0" />
<PackageVersion Include="TLio.Json.SystemText" Version="1.2.0" />
<PackageReference Include="TLio.Json.SystemText" />
paket add TLio.Json.SystemText --version 1.2.0
#r "nuget: TLio.Json.SystemText, 1.2.0"
#:package TLio.Json.SystemText@1.2.0
#addin nuget:?package=TLio.Json.SystemText&version=1.2.0
#tool nuget:?package=TLio.Json.SystemText&version=1.2.0
TLio.Json.SystemText
The System.Text.Json adapter for TLio —
INodeAdapter<JsonNode> and IItemsFetcher<JsonNode> implementations backed by
System.Text.Json.Nodes and the TLio.JsonPath engine, which evaluates
paths directly on the document's own nodes.
Newtonsoft.Json is not referenced. Transformation behaviour is identical to TLio.Json: the
default path dialect reproduces Newtonsoft's JSONPath exactly (the same nodes, in the same order, with
the same errors), and a differential test suite holds it to that against Newtonsoft.Json itself.
dotnet add package TLio.Json.SystemText
dotnet add package TLio.Client
Quick start
using System.Text.Json.Nodes;
using TLio.Client;
using TLio.Json.SystemText;
var data = JsonNode.Parse("""{ "name": "Acme", "tempId": 7 }""");
var script = """
[
{ "command": "put", "path": "$.status", "value": "active" },
{ "command": "remove", "path": "$.tempId" }
]
""";
var options = ParseOptions<JsonNode>.CreateDefault();
var engine = new ScriptEngine<JsonNode>(options.CommandsProvider, options.FunctionsProvider);
var result = engine.Execute(script, data, SystemTextJsonExecutionContext.CreateDefault());
Path language
By default paths are read in the Newtonsoft dialect, so a script written for TLio.Json runs
unchanged:
$.customer.name
$.orders[*].total
$.orders[?(@.total > 100)]
$.orders[?(@.name =~ /^A/i)]
Script expressions (() as an expression) are not supported, in either adapter.
Pick another dialect when you create the context:
using TLio.JsonPath;
SystemTextJsonExecutionContext.CreateDefault(); // Newtonsoft (default)
SystemTextJsonExecutionContext.CreateDefault(JsonPathDialect.Rfc9535); // strict RFC 9535
SystemTextJsonExecutionContext.CreateDefault(JsonPathDialect.Extended); // Newtonsoft + RFC 9535 where Newtonsoft has no answer
// …or hand over a configured engine: custom functions, regex timeout, limits.
SystemTextJsonExecutionContext.Create(new JsonPathEngine(new JsonPathOptions { Dialect = JsonPathDialect.Rfc9535 }));
| Newtonsoft (default) | Rfc9535 |
Extended |
|
|---|---|---|---|
$[?(@.price < 10)] |
✓ | ✓ | ✓ |
$[?@.price < 10], $[-1], $["a"] |
✗ | ✓ | ✓ |
match(), search(), length(), count(), value() |
✗ | ✓ | ✓ |
=~ /re/, ===, $.a-b |
✓ | ✗ | ✓ |
Matches TLio.Json |
exactly | where the standard and Newtonsoft agree | wherever Newtonsoft has an answer |
The full syntax tables, the divergence table and the configuration options are in the
TLio.JsonPath README.
Behaviour worth knowing
- An invalid path throws (
JsonPathException) — as Newtonsoft'sSelectTokensdoes — instead of quietly selecting nothing. SelectNodeon a path that selects several nodes throws, asSelectTokendoes; useSelectNodes.- A member whose value is JSON
nullis selectable (it is a match with a null node; the adapter hands out a placeholder for the slot), and is told apart from a member that is absent. - Dates. Newtonsoft parses date-looking strings into date values, which changes how filters compare
them. The default dialect reproduces that for System.Text.Json documents; see Dates in the
TLio.JsonPathREADME, andJsonPathOptions.EmulateNewtonsoftDatesto turn it off.
Coming from the JsonCons-based version
See the Migrating section of the TLio.JsonPath README: the default dialect is now Newtonsoft's, errors are
no longer swallowed, and selection runs on the live document instead of a serialized snapshot.
License
MIT — see the repository.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- TLio.Core (>= 1.2.0)
- TLio.JsonPath (>= 1.2.0)
-
net8.0
- TLio.Core (>= 1.2.0)
- TLio.JsonPath (>= 1.2.0)
-
net9.0
- TLio.Core (>= 1.2.0)
- TLio.JsonPath (>= 1.2.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.3.0-preview.1 | 42 | 10/12/2026 |
| 1.2.0 | 110 | 10/11/2026 |
| 1.1.0 | 83 | 10/8/2026 |
| 1.1.0-preview.9 | 50 | 10/8/2026 |
| 1.1.0-preview.8 | 51 | 10/7/2026 |
| 1.1.0-preview.7 | 57 | 10/5/2026 |
| 1.1.0-preview.5 | 66 | 9/27/2026 |
| 1.1.0-preview.4 | 62 | 9/27/2026 |
| 1.1.0-preview.3 | 63 | 9/24/2026 |
| 1.1.0-preview.2 | 62 | 9/24/2026 |
| 1.1.0-preview.1 | 62 | 9/24/2026 |
| 1.0.1 | 441 | 9/24/2026 |
| 1.0.0 | 110 | 9/20/2026 |
| 0.10.0-preview.6 | 60 | 9/20/2026 |
| 0.10.0-preview.5 | 70 | 9/20/2026 |
| 0.10.0-preview.4 | 63 | 9/18/2026 |
| 0.10.0-preview.3 | 66 | 9/18/2026 |
| 0.10.0-preview.2 | 66 | 9/13/2026 |
| 0.10.0-preview.1 | 92 | 8/24/2026 |
| 0.9.0 | 128 | 8/23/2026 |