Serify 0.1.0
dotnet add package Serify --version 0.1.0
NuGet\Install-Package Serify -Version 0.1.0
<PackageReference Include="Serify" Version="0.1.0" />
<PackageVersion Include="Serify" Version="0.1.0" />
<PackageReference Include="Serify" />
paket add Serify --version 0.1.0
#r "nuget: Serify, 0.1.0"
#:package Serify@0.1.0
#addin nuget:?package=Serify&version=0.1.0
#tool nuget:?package=Serify&version=0.1.0
serify — C# worker library
C# / .NET worker library for serify, a cross-language serialization conformance harness.
You define a schema and test cases once; each target language ships a small
worker program that serializes and deserializes the data, and the serify
CLI drives every worker through the same cases and compares their output
byte-for-byte. This package is what a C# worker references.
Install
dotnet add package Serify
Usage
[SerifyModel] plus one [SerifyField] per property is the binding. You supply
the byte layout and register it per format:
using System.Collections.Generic;
using Serify;
[SerifyModel]
internal sealed class UserRecord
{
[SerifyField("user_id")] public ulong UserId { get; set; }
[SerifyField] public string Username { get; set; } = "";
[SerifyField] public float Score { get; set; }
public byte[] Marshal() { /* your byte layout */ }
public static UserRecord Unmarshal(byte[] data) { /* its inverse */ }
}
internal static class Program
{
private static void Main()
{
Serify.Worker.RunSuite(new Dictionary<string, TypeEntry>
{
["user"] = TypeEntry.Model<UserRecord>(new()
{
["binary"] = (u => u.Marshal(), UserRecord.Unmarshal),
}),
});
}
}
[SerifyField("key")] renames a property's schema key; a bare [SerifyField]
uses the property name. Nested classes work by attributing the nested type.
RunSuite takes over stdin/stdout to speak the NDJSON protocol the CLI drives,
so a worker's own output must go to stderr.
Documentation
Full documentation, the protocol spec, and reference workers for all nine languages live in the main repository.
License
Apache-2.0
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- System.Text.Json (>= 8.0.6)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0 | 68 | 8/19/2026 |