Skip to content

Commit

Permalink
nonconfigurable limits
Browse files Browse the repository at this point in the history
  • Loading branch information
tdykstra committed Oct 29, 2021
1 parent ce8f5a4 commit f90fad0
Showing 1 changed file with 8 additions and 1 deletion.
Expand Up @@ -4,7 +4,7 @@ description: "Learn how to migrate from Newtonsoft.Json to System.Text.Json. Inc
author: tdykstra
ms.author: tdykstra
no-loc: [System.Text.Json, Newtonsoft.Json]
ms.date: 10/20/2021
ms.date: 10/29/2021
zone_pivot_groups: dotnet-version
helpviewer_keywords:
- "JSON serialization"
Expand Down Expand Up @@ -88,6 +88,7 @@ The following table lists `Newtonsoft.Json` features and `System.Text.Json` equi
| Allow non-string JSON values for string properties |[Not supported](#non-string-values-for-string-properties) |
| `TypeNameHandling.All` global setting |[Not supported](#typenamehandlingall-not-supported) |
| Support for `JsonPath` queries |[Not supported](#json-path-queries-not-supported) |
| Configurable limits |[Not supported](#some-limits-not-configurable) |
::: zone-end

::: zone pivot="dotnet-5-0"
Expand Down Expand Up @@ -133,6 +134,7 @@ The following table lists `Newtonsoft.Json` features and `System.Text.Json` equi
| Allow non-string JSON values for string properties |[Not supported](#non-string-values-for-string-properties) |
| `TypeNameHandling.All` global setting |[Not supported](#typenamehandlingall-not-supported) |
| Support for `JsonPath` queries |[Not supported](#json-path-queries-not-supported) |
| Configurable limits |[Not supported](#some-limits-not-configurable) |
::: zone-end

::: zone pivot="dotnet-core-3-1"
Expand Down Expand Up @@ -178,6 +180,7 @@ The following table lists `Newtonsoft.Json` features and `System.Text.Json` equi
| Allow non-string JSON values for string properties |[Not supported](#non-string-values-for-string-properties) |
| `TypeNameHandling.All` global setting |[Not supported](#typenamehandlingall-not-supported) |
| Support for `JsonPath` queries |[Not supported](#json-path-queries-not-supported) |
| Configurable limits |[Not supported](#some-limits-not-configurable) |
::: zone-end

This is not an exhaustive list of `Newtonsoft.Json` features. The list includes many of the scenarios that have been requested in [GitHub issues](https://github.com/dotnet/runtime/issues?q=is%3Aopen+is%3Aissue+label%3Aarea-System.Text.Json) or [StackOverflow](https://stackoverflow.com/questions/tagged/system.text.json) posts. If you implement a workaround for one of the scenarios listed here that doesn't currently have sample code, and if you want to share your solution, select **This page** in the **Feedback** section at the bottom of this page. That creates an issue in this documentation's GitHub repo and lists it in the **Feedback** section on this page too.
Expand Down Expand Up @@ -833,6 +836,10 @@ In a <xref:System.Text.Json.Nodes.JsonNode> DOM, each `JsonNode` instance has a

For more information, see the [dotnet/runtime #31068 GitHub issue](https://github.com/dotnet/runtime/issues/31068).

## Some limits not configurable

System.Text.Json sets limits that can't be changed for some values, such as the maximum token size in characters (166 MB) and in base 64 (125 MB). For more information, see [`JsonConstants` in the source code](https://github.com/dotnet/runtime/blob/e5f3fa0ed0f52b5073dbfcc7fa800246b9e17adf/src/libraries/System.Text.Json/src/System/Text/Json/JsonConstants.cs#L75-L78) and GitHub issue [dotnet/runtime #39953](https://github.com/dotnet/runtime/issues/39953).

## Additional resources

* [System.Text.Json overview](system-text-json-overview.md)
Expand Down

0 comments on commit f90fad0

Please sign in to comment.