Afrowave.AJIS.Serialization
1.1.0
dotnet add package Afrowave.AJIS.Serialization --version 1.1.0
NuGet\Install-Package Afrowave.AJIS.Serialization -Version 1.1.0
<PackageReference Include="Afrowave.AJIS.Serialization" Version="1.1.0" />
<PackageVersion Include="Afrowave.AJIS.Serialization" Version="1.1.0" />
<PackageReference Include="Afrowave.AJIS.Serialization" />
paket add Afrowave.AJIS.Serialization --version 1.1.0
#r "nuget: Afrowave.AJIS.Serialization, 1.1.0"
#:package Afrowave.AJIS.Serialization@1.1.0
#addin nuget:?package=Afrowave.AJIS.Serialization&version=1.1.0
#tool nuget:?package=Afrowave.AJIS.Serialization&version=1.1.0
Afrowave.AJIS.Serialization
Segment-based serializer and high-level API for the AJIS (.NET) framework. Provides compact and human-readable serialization with multiple modes, value serialization, and streaming support.
Overview
The Serialization library enables converting between AJIS segments and .NET objects with enterprise-grade features:
- Segment serializer - High-throughput serialization from segments
- High-level API -
AjisSerializer<T>for object mapping - Multiple modes - Strict JSON, Canonical, Pretty formatting
- Value serialization -
AjisValuefor polymorphic serialization - Async streaming - Memory-efficient serialization over streams
- Zero-allocation - Optimized for high-throughput scenarios
Features
- Segment serialization -
AjisSerializefor low-level segment-to-text - High-level API -
AjisSerializerfor object-to-text conversion - Multiple modes:
Compact- Minimal size, no whitespacePretty- Readable with indentation and newlinesCanonical- Deterministic output (sorted keys)
- Value serialization - Support for
AjisValue(text/stream/bytes) - Async support - All serialization methods support async patterns
- Type mapping - Property attributes, naming policies
- Error handling - Detailed diagnostics and exception messages
Installation
dotnet add package Afrowave.AJIS.Serialization
API
See the API Reference for complete documentation.
Key Types
| Type | Description |
|---|---|
AjisSerialize |
Low-level segment serializer |
AjisSerializer |
High-level serializer API |
AjisSerializer<T> |
Generic serializer with type mapping |
AjisValue |
Polymorphic value representation |
AjisSegment |
Streaming segment |
AjisSerializationOptions |
Serialization configuration |
Dependencies
- Afrowave.AJIS.Core - Core contracts and settings
- Afrowave.AJIS.Streaming - Segment parser and model
Usage
Basic serialization
using Afrowave.AJIS.Serialization;
public class User
{
public int Id { get; set; }
public string Name { get; set; }
}
var user = new User { Id = 1, Name = "Alice" };
var serializer = new AjisSerializer();
// Serialize to text
string text = serializer.Serialize(user);
// {"Id":1,"Name":"Alice"}
Serialization modes
var options = new AjisSerializationOptions
{
Compact = false, // Add spaces after commas/colons
Pretty = true, // Add newlines and indentation
Canonicalize = true // Order object properties by key
};
string prettyText = serializer.Serialize(user, options);
/*
{
"Id" : 1,
"Name" : "Alice"
}
*/
Value serialization
var value = new AjisValue(new Dictionary<string, AjisValue>
{
["name"] = new AjisValue("Alice"),
["age"] = new AjisValue(30)
});
string text = serializer.Serialize(value);
Async streaming
await using var stream = File.Create("users.ajis");
await serializer.SerializeAsync(user, stream);
Documentation
- API Reference - Complete API documentation
- Serialization Modes - Processing profiles and mode selection
- Canonicalization - Canonical serialization details
- Getting Started - Quick start guide
Compatibility
- .NET 10.0+
- Nullable reference types enabled
License
MIT
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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. |
-
net10.0
- Afrowave.AJIS.Core (>= 1.1.0)
- Afrowave.AJIS.Streaming (>= 1.1.0)
NuGet packages (4)
Showing the top 4 NuGet packages that depend on Afrowave.AJIS.Serialization:
| Package | Downloads |
|---|---|
|
Afrowave.AJIS.IO
IO library for Ajis framework |
|
|
Afrowave.AJIS.MongoDB
MongoDB integration for Ajis framework |
|
|
Afrowave.AJIS.EntityFramework
Entity Framework integration for Ajis framework |
|
|
Afrowave.AJIS.Net
NET library for Ajis framework |
GitHub repositories
This package is not used by any popular GitHub repositories.
## v1.1.0 (2026-02-16)
### New Features
- Integration with new Ajis static API from Afrowave.AJIS.Core v1.1.0
### Dependencies
- Afrowave.AJIS.Core v1.1.0
### Notes
- No breaking changes in this release