Skip to content

Releases: Dura-IT/fastbinaryjson

v0.4.2

Choose a tag to compare

@github-actions github-actions released this 13 Oct 13:01
7d89465
  • Fewer allocations when reading lists of primitives. A List<T> of int, long, decimal, double, bool, Guid, DateTime and the other primitive types used to be read element by element into a List<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 a List<T>. For 1,000 elements, a List<int> allocates 8,736 B instead of 45,048 B and a List<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.md are 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

Choose a tag to compare

@github-actions github-actions released this 12 Oct 15:42
fcf3bcb
  • Fewer allocations when writing lists and arrays of primitives. A List<T> or T[] of int, long, decimal, double, bool, Guid, DateTime and 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, a List<decimal> allocates 18,232 B instead of 50,280 B, a List<int> 6,232 B instead of 30,272 B, and a decimal[] 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.md has 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

Choose a tag to compare

@github-actions github-actions released this 12 Oct 09:18
d83d7c8
  • Per-call parameters on every read. ToObject(bytes, Type, param), Parse(bytes, param), ToDynamic(bytes, param), FillObject(input, bytes, param) and DeepCopy(obj, param) take the settings for that call, so code that picks the type at run time no longer has to change the global Bjson.Parameters. The parameters you pass are copied and never modified.
  • Behaviour change: reads without parameters now resolve conflicting settings. ToObject, FillObject and DeepCopy without a param argument used to skip the step that turns EnableAnonymousTypes into ShowReadOnlyProperties, 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 set EnableAnonymousTypes on Bjson.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.md has 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

Choose a tag to compare

@github-actions github-actions released this 08 Oct 16:39
2c1e3bf
  • Fewer allocations on netstandard2.0 (the build .NET Framework runs): a decimal is written without an int[4] per value. The value's own memory is read after a one-time check against decimal.GetBits that 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

Choose a tag to compare

@github-actions github-actions released this 08 Oct 14:55
3ab7147
  • 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 ShowReadOnlyProperties setting. 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 $types table 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

Choose a tag to compare

@github-actions github-actions released this 08 Oct 12:26
4cd5f2e
  • 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 $types table 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

Choose a tag to compare

@github-actions github-actions released this 08 Oct 09:07
de05721

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. DateTimeOffset now serializes.
  • Malformed or truncated input throws BjsonException from 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