Crosswalk.Core 0.1.0

dotnet add package Crosswalk.Core --version 0.1.0
                    
NuGet\Install-Package Crosswalk.Core -Version 0.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="Crosswalk.Core" Version="0.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Crosswalk.Core" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Crosswalk.Core" />
                    
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 Crosswalk.Core --version 0.1.0
                    
#r "nuget: Crosswalk.Core, 0.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 Crosswalk.Core@0.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=Crosswalk.Core&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Crosswalk.Core&version=0.1.0
                    
Install as a Cake Tool

Crosswalk.Core

Runs Crosswalk maps in .NET. A Crosswalk map is a JSON-to-JSON mapping drawn in the browser with the Crosswalk editor and saved as plain JSON. This package loads one, checks it, and runs it on your data, synchronously or asynchronously.

dotnet add package Crosswalk.Core
using System.Text.Json.Nodes;
using Crosswalk;

var transform = MapTransform.Create(File.ReadAllText("order-to-invoice.map.json")); // checks the map once

JsonObject invoice = transform.Run(JsonNode.Parse(orderJson));

Create a MapTransform once per map and reuse it. It's safe to run from many threads.

Operators that wait

Your own operators are C#. One that has to wait, such as a lookup, is an AsyncValueOperator, and maps that use one run with RunAsync:

var tier = new AsyncValueOperator
{
    Id = "acme.customerTier",
    Label = "Customer tier",
    Category = "acme",
    Inputs = new(1, 1),
    Run = async (args, cancellationToken) => await customers.GetTierAsync(Coerce.ToText(args[0]), cancellationToken),
};

var transform = MapTransform.Create(mapJson, new TransformOptions
{
    Registry = OperatorRegistry.Create(new RegistryOptions { Operators = [tier] }),
    Concurrency = 8, // async calls waiting at once, per run
});

JsonObject output = await transform.RunAsync(input, cancellationToken);

registry.ToCatalog() describes your operators as JSON, so the browser editor can offer exactly what your runtime can run.

It's the same map format, and the same behaviour, as the JavaScript packages: both pass the same conformance suite. Read the documentation for more.

Targets .NET 8 and later. MIT licensed.

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

    • No dependencies.

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 41 11/12/2026