Home

CSystemTextJson

CSystemTextJson, commonly referred to as System.Text.Json, is a high-performance JSON library for the .NET platform. It provides APIs to read, write, deserialize, and serialize JSON data with a focus on speed and low memory usage. It is part of the base class library introduced with .NET Core 3.0.

Core API access is centered on JsonSerializer for high-level serialization and deserialization, and on streaming helpers

Performance and adoption are hallmarks of System.Text.Json. The library is optimized for speed and reduced allocations,

Features and capabilities include support for custom converters, the JsonInclude attribute to include non-public members, and

History and scope: System.Text.Json was introduced with .NET Core 3.0 as a built-in alternative to Json.NET for

such
as
Utf8JsonReader
and
Utf8JsonWriter
for
low-level
access.
For
in-memory
DOM-style
inspection,
it
offers
JsonDocument
and
JsonElement.
Configuration
is
performed
through
JsonSerializerOptions,
which
cover
property
naming
policies,
case
sensitivity,
and
custom
converters,
among
other
settings.
making
it
well
suited
to
high-throughput
scenarios.
It
is
the
default
JSON
provider
in
ASP.NET
Core
applications
and
integrates
tightly
with
the
framework’s
hosting
and
serialization
pipelines.
In
recent
.NET
releases,
features
such
as
source
generation
have
further
boosted
serialization
performance
by
generating
code
at
compile
time.
options
to
ignore
null
values.
Reference
handling
and
polymorphic
deserialization
are
available
through
runtime
options
and
converters
in
newer
runtimes.
The
library
also
supports
advanced
customization
while
maintaining
type
safety,
and
it
can
be
extended
with
source-generated
serializers
for
specific
types
to
improve
performance.
many
scenarios.
Over
successive
Framework
releases
it
gained
capabilities
such
as
reference
handling,
improved
polymorphism,
and
optional
source
generation,
broadening
its
applicability.
It
remains
the
recommended
default
for
many
new
.NET
applications,
although
some
projects
may
still
rely
on
Newtonsoft.Json
for
feature
parity
or
compatibility.