Skip to content

Latest commit

 

History

History

System.Text.Json

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

System.Text.Json

This project defines the System.Text.Json serialization library. It provides low-level, forward-only JSON reader and writer components and a JSON serialization layer for .NET types using both runtime reflection and compile-time source generation. The library also includes a couple of JSON DOM implementations that can be used for introspection and manipulation of JSON documents.

Documentation can be found at https://learn.microsoft.com/dotnet/standard/serialization/system-text-json/overview.

Contribution Bar

See the Help Wanted issues.

Source

  • System.Text.Json runtime: src/
  • System.Text.Json source generator: gen/

Building & Testing

Building and testing System.Text.Json follows the same workflow as other libraries. Instructions can be found in the relevant section in the workflow guide.

Debugging the Source Generator

Developers wishing to debug the compile-time source generator itself should build the source generator using the LaunchDebugger property:

$ cd src/libraries/System.Text.Json/
$ dotnet build -p:LaunchDebugger=true gen/System.Text.Json.SourceGeneration.Roslyn4.0.csproj # replace with appropriate Roslyn version

Subsequent runs of the source generator will attempt to attach themselves to a debugger. Please ensure that any IDEs consuming the source generator are restarted after the above command is run.

Deployment

The library is shipped as part of the .NET shared framework and as a NuGet package. Daily builds of the NuGet package can be obtained following these instructions.