Repository navigation
Releases: Dura-IT/fastbinaryjson
Releases · Dura-IT/fastbinaryjson
Release list
v0.4.2
- Fewer allocations when reading lists of primitives. A
List<T>ofint,long,decimal,double,bool,Guid,DateTimeand the other primitive types used to be read element by element into aList<object>, boxing each one, and then copied into the real list. When every element carries the type's own token it is now read straight into aList<T>. For 1,000 elements, aList<int>allocates 8,736 B instead of 45,048 B and aList<decimal>33,264 B instead of 65,048 B. A list with anything else in it (another width, a null, damaged bytes) is finished by the previous code, so the result, or the exception, is the same as before; this is checked against the old path for 15 element types as root and member, plus 600 seeded damaged payloads. - A list read this way is trimmed when it is longer than 64 elements and growth left it with spare capacity, so it does not hold up to twice its content.
- SECURITY.md now lists 0.4.x as the supported line.
- README and
docs/benchmarks.mdare re-measured. The benchmark corpus has no primitive-list member, so the tables show no change from this release; only the noisy cells moved. - No change to the wire format or to the public API.
Package: https://www.nuget.org/packages/DuraIT.FastBinaryJson/0.4.2
v0.4.1
- Fewer allocations when writing lists and arrays of primitives. A
List<T>orT[]ofint,long,decimal,double,bool,Guid,DateTimeand the other primitive types used to box every element on the way out. Elements are now written straight from the typed collection. For 1,000 elements, aList<decimal>allocates 18,232 B instead of 50,280 B, aList<int>6,232 B instead of 30,272 B, and adecimal[]18,448 B instead of 50,480 B; what remains is the output itself. No change to the bytes written, checked by writing 15 primitive types as lists and arrays both ways under nine parameter sets. Reading is unchanged. - README. The Performance tables are re-measured on this code (time, allocation and size, against fastBinaryJSON 1.6.1 and System.Text.Json), and the gzip columns are gone.
docs/benchmarks.mdhas the full BenchmarkDotNet output for every arm, and the reproduction commands now run as written. - No change to the wire format or to the public API, and no measurable change in speed on the benchmark corpus, which has no primitive lists.
Package: https://www.nuget.org/packages/DuraIT.FastBinaryJson/0.4.1
v0.4.0
- Per-call parameters on every read.
ToObject(bytes, Type, param),Parse(bytes, param),ToDynamic(bytes, param),FillObject(input, bytes, param)andDeepCopy(obj, param)take the settings for that call, so code that picks the type at run time no longer has to change the globalBjson.Parameters. The parameters you pass are copied and never modified. - Behaviour change: reads without parameters now resolve conflicting settings.
ToObject,FillObjectandDeepCopywithout aparamargument used to skip the step that turnsEnableAnonymousTypesintoShowReadOnlyProperties, so they read a get-only collection differently from the same call given the same parameters explicitly. All reads now go through one path. If you setEnableAnonymousTypesonBjson.Parameters, get-only members are now filled on read, as they already were when you passed the parameters in. - README. New Performance section (time, allocation and wire size against fastBinaryJSON 1.6.1 and System.Text.Json, on the repository's own corpus), with commands that reproduce it.
docs/benchmarks.mdhas the full BenchmarkDotNet output for every arm. System.Text.Json is ahead on allocation and on most raw sizes, and the text says so. - No change to the wire format, and no measurable change in speed or allocation against 0.3.0 (checked with the same benchmark on net10.0).
Package: https://www.nuget.org/packages/DuraIT.FastBinaryJson/0.4.0
v0.3.0
- Fewer allocations on netstandard2.0 (the build .NET Framework runs): a
decimalis written without anint[4]per value. The value's own memory is read after a one-time check againstdecimal.GetBitsthat the runtime's layout is the known one; any other runtime keeps the array. Per decimal, allocation drops from 90 B to 50 B on that build. No change to the wire format, and nothing changes on .NET 10.
Package: https://www.nuget.org/packages/DuraIT.FastBinaryJson/0.3.0
v0.2.0
- Read-only members: with
ShowReadOnlyProperties = true, readonly fields are now restored on deserialize, like get-only auto-properties and members with a non-public setter already were. Before, a readonly field that was written came back as its default with no error. The default setting is unchanged. - Member metadata is cached per
ShowReadOnlyPropertiessetting. Before, whichever call first touched a type decided the result for the rest of the process. - Fewer allocations: the netstandard2.0 build (what .NET Framework runs) no longer allocates a small array per value it serializes, and typed deserialize reuses the parsed
$typestable when consecutive payloads carry the same bytes. No change to the wire format. - A null string (for example a null key in a
NameValueCollection) is written as an empty string on netstandard2.0 in both encodings, and on .NET 10, where it used to throw. - The README is rewritten for new readers, and each package version now links to its release notes.
Package: https://www.nuget.org/packages/DuraIT.FastBinaryJson/0.2.0
v0.1.1
- The package now has an icon.
- LICENSE credits Durable IT Solutions next to the original author, matching the package metadata.
- Adds a security policy (
SECURITY.md). - Typed deserialize reuses the parsed
$typestable when consecutive payloads carry the same bytes, which cuts allocation per call, most on small payloads. No change to the wire format.
Package: https://www.nuget.org/packages/DuraIT.FastBinaryJson/0.1.1
v0.1.0
First release of DuraIT.FastBinaryJson, a maintained fork of mgholam/fastBinaryJSON.
- Targets .NET 10 and netstandard2.0. The wire format is unchanged, and 16 golden fixtures assert the exact bytes.
- Namespace
DuraIT.FastBinaryJson, public API in .NET naming. The README has a migration table from the original names. - Strong-name signed with its own key, public key token
8cd8b707f36b302a. - Defects from the original are fixed, each with a regression test.
DateTimeOffsetnow serializes. - Malformed or truncated input throws
BjsonExceptionfrom every reading entry point. - Clean under Sonar, Roslynator and the full .NET analyzer set with warnings as errors. CI runs on Linux, macOS and Windows.
Package: https://www.nuget.org/packages/DuraIT.FastBinaryJson/0.1.0