What Changed
The System.Text.Json
library is now used to process Vector Tile styles instead of Newtonsoft.Json
for .NET 6+ platforms. .NET Framework apps continue to use the Newtonsoft.Json
library.
Reasons for Change
- Microsoft designed
System.Text.Json
for security standard compliance (the RFC 8259 specification) and performance (both faster and lower memory allocation). - Microsoft uses
System.Text.Json
in many their products since the release of ASP.NET Core 3.0 and also recommends it as a long-term solution for .NET developers. For more information, please refer to Overview | Migrate from Newtonsoft.Json to System.Text.Json. - Microsoft supports
System.Text.Json
for .NET 6+ and .NET Framework 4.6.2+ apps. This support allows us to use this library across a wide range of DevExpress libraries/components.
Impact on Existing Apps
Json data source will throw an exception during deserialization if the Json structure does not meet the ECMA-262 standard. For example, Json property names must be enclosed in double quotes. Single quotes or no quotes are not allowed.
How to Update Existing Apps
Ensure the source Json file meets appropriate requirements (update quotes for Json properties).
How to Revert to Previous Behavior
Set the DevExpress.Map.Native.VectorTileStyleParser.ProcessingLibrary
property to NewtonsoftJson
:
C#DevExpress.Map.Native.VectorTileStyleParser.ProcessingLibrary = DevExpress.Map.Native.VectorTileStyleParser.JsonProcessingLibrary.NewtonsoftJson;