Releases: Zastai/MetaBrainz.Common.Json
Releases · Zastai/MetaBrainz.Common.Json
1.1.1
1.1
v1.1.0 (2020-04-15)
API Changes
AnyObjectConverter
is now marked as[Obsolete]
- it is superseded by
AnyObjectReader
(see below)
- it is superseded by
API Additions
- New Class:
JsonReader<T>
- a deserialization-only
JsonConverter<T>
- a deserialization-only
- New Class:
JsonWriter<T>
- a serialization-only
JsonConverter<T>
- a serialization-only
- New Class:
JsonConverter<T, TReader, TWriter>
- a
JsonConverter<T>
that forwards to aJsonReader<T>
andJsonWriter<T>
- a
- New Class:
ObjectReader<T>
- aJsonReader<T>
that handles values serialized as JSON objects- has an abstract
ReadObjectContents
method to override
- has an abstract
- New Class:
ObjectWriter<T>
- aJsonWriter<T>
that handles values serialized as JSON objects- has an abstract
WriteObjectContents
method to override
- has an abstract
- New Class:
AnyObjectReader
- aJsonReader<object?>
that handles any value as a .NET object- replaces
AnyObjectConverter
- slightly different behaviour:
- numbers will use
int
when possible (instead of starting fromlong
) - decimal numbers will avoid
decimal
in degenerate cases - JSON objects are mapped to
Dictionary<string,object?>
instead ofJsonElement
- numbers will use
- replaces
- New Method:
JsonUtils.ReadList()
(several overloads)- simplifies deserialisation of JSON arrays
- New Methods:
JsonUtils.WriteList()
andJsonUtils.WriteListAsync()
(several overloads)- simplifies serialisation of JSON arrays
Other Changes
- tweaks and updates to the build system
- marked more types as
[PublicAPI]
(dev-time change only)
Dependency Updates
- JetBrainz.Annotations → 2020.1.0
- System.Text.Json → 4.7.1
1.0
v1.0.0 (2020-03-20)
First release.
This package contains some JSON-related helper classes that were used by multiple projects of
the MusicBrainz repository, which has been split into
multiple repositories (aiming for one NuGet package == one repository).