Breaking Change T1225165
Visible to All Users

XAF - System.Text.Json library is now used to deserialize input parameters for Web API Service endpoints - business object methods

What Changed

For .NET 6.0+ platforms, the System.Text.Json library is used to deserialize input parameters for Web API endpoints - business object methods instead of Newtonsoft.Json.

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

Web API Service will throw an exception during deserialization in the following instance:

  • 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 that JSON data you send to Web API service endpoints meet appropriate requirements (update quotes for JSON properties).
  • Remove the Newtonsoft.Json dependency from the project if it was added explicitly.
  • Add the System.Text.Json dependency or update to version 7.0.0+.

Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.