Ignixa.Serialization 0.0.57

There is a newer version of this package available.
See the version list below for details.
dotnet add package Ignixa.Serialization --version 0.0.57
                    
NuGet\Install-Package Ignixa.Serialization -Version 0.0.57
                    
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="Ignixa.Serialization" Version="0.0.57" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Ignixa.Serialization" Version="0.0.57" />
                    
Directory.Packages.props
<PackageReference Include="Ignixa.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 Ignixa.Serialization --version 0.0.57
                    
#r "nuget: Ignixa.Serialization, 0.0.57"
                    
#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 Ignixa.Serialization@0.0.57
                    
#: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=Ignixa.Serialization&version=0.0.57
                    
Install as a Cake Addin
#tool nuget:?package=Ignixa.Serialization&version=0.0.57
                    
Install as a Cake Tool

Ignixa.Serialization

High-performance FHIR JSON serialization library. Provides utilities for working with FHIR resources using System.Text.Json.Nodes, including source node navigation and enum literal conversions.

Why Use This Package?

  • JsonNode-based: Modern JSON handling using System.Text.Json.Nodes
  • ISourceNavigator support: Create source navigators from JSON for validation and FHIRPath evaluation
  • Enum utilities: Convert between FHIR enum codes and .NET enums

Installation

dotnet add package Ignixa.Serialization

Quick Start

Creating Source Nodes from JSON

using Ignixa.Serialization;
using Ignixa.Abstractions;

// Parse JSON string to ResourceJsonNode
var json = """
{
  "resourceType": "Patient",
  "id": "123",
  "name": [{
    "family": "Doe",
    "given": ["John"]
  }]
}
""";

// Create ISourceNavigator for navigation
var sourceNode = JsonSourceNodeFactory.Parse(json).ToSourceNavigator();

// Navigate the source node
Console.WriteLine(sourceNode.Name);  // "root"
Console.WriteLine(sourceNode.ResourceType);  // "Patient"

foreach (var child in sourceNode.Children())
{
    Console.WriteLine($"{child.Name}: {child.Text}");
}
// Output:
// resourceType: Patient
// id: 123
// name: (complex)

Working with Enum Literals

FHIR uses string codes for enums. This package provides utilities to convert them:

using Ignixa.Serialization;
using Ignixa.Specification.ValueSets.Normative;

// FHIR enum with EnumLiteral attributes
public enum AdministrativeGender
{
    [EnumLiteral("male")]
    Male,

    [EnumLiteral("female")]
    Female,

    [EnumLiteral("other")]
    Other,

    [EnumLiteral("unknown")]
    Unknown
}

// Convert code string to enum
var gender = EnumUtility.ParseLiteral<AdministrativeGender>("male");
// gender == AdministrativeGender.Male

// Convert enum to code string
var code = gender.GetLiteral();
// code == "male"

Integration with Other Packages

  • Ignixa.Abstractions: Implements ISourceNavigator for JSON data
  • Ignixa.Specification: Provides enum types with [EnumLiteral] attributes
  • Ignixa.Validation: Uses ISourceNavigator for validation
  • Ignixa.FhirPath: Can evaluate expressions against source navigators

Performance Notes

  • JsonNode: Uses modern System.Text.Json for best performance
  • Source nodes: Lazy evaluation - children only materialized when accessed
  • Enum lookup: Uses cached dictionaries for O(1) lookup

License

MIT License - see LICENSE file in repository root

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (10)

Showing the top 5 NuGet packages that depend on Ignixa.Serialization:

Package Downloads
Ignixa.Specification

FHIR specification data and structure providers (R4/R4B/R5/STU3)

Ignixa.Extensions.FirelySdk6

Firely SDK interoperability shims for bidirectional conversion

Ignixa.SqlOnFhir

SQL on FHIR implementation for analytics queries

Ignixa.Validation

FHIR resource validation with profile support

Ignixa.FhirMappingLanguage

FHIR Mapping Language (FML) parser and execution engine

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.0.127 169 12/29/2025
0.0.109 458 12/18/2025
0.0.101 417 12/16/2025
0.0.96 568 12/10/2025
0.0.87 556 12/8/2025
0.0.70 468 12/7/2025
0.0.68 293 12/7/2025
0.0.62 302 12/6/2025
0.0.59 246 12/5/2025
0.0.58 277 12/5/2025
0.0.57 280 12/3/2025
0.0.56 736 12/3/2025
0.0.55 494 12/1/2025
0.0.54 471 11/30/2025
0.0.53 469 11/30/2025
0.0.51 184 11/29/2025
0.0.50 157 11/29/2025