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
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Afrowave.AJIS.Serialization" Version="1.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Afrowave.AJIS.Serialization" Version="1.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Afrowave.AJIS.Serialization" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Afrowave.AJIS.Serialization --version 1.1.0
                    
#r "nuget: Afrowave.AJIS.Serialization, 1.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Afrowave.AJIS.Serialization@1.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Afrowave.AJIS.Serialization&version=1.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Afrowave.AJIS.Serialization&version=1.1.0
                    
Install as a Cake Tool

Afrowave.AJIS.Serialization

NuGet

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 - AjisValue for polymorphic serialization
  • Async streaming - Memory-efficient serialization over streams
  • Zero-allocation - Optimized for high-throughput scenarios

Features

  • Segment serialization - AjisSerialize for low-level segment-to-text
  • High-level API - AjisSerializer for object-to-text conversion
  • Multiple modes:
    • Compact - Minimal size, no whitespace
    • Pretty - Readable with indentation and newlines
    • Canonical - 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

Compatibility

  • .NET 10.0+
  • Nullable reference types enabled

License

MIT

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.

Version Downloads Last Updated
1.1.0 194 2/17/2026
1.0.0 163 2/15/2026

## 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