SpanFlow.Mapping.Engine 1.0.1

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

SpanFlow Mapping

Turn one shape of JSON into another with a declarative mapping definition: paths, functions, conditions, grouping, joins and aggregates. It runs in-process with no server, and it is the engine behind SpanFlow's transform node and visual mapping designer.

Package What it holds
SpanFlow.Mapping.Core The mapping definition model and its validator
SpanFlow.Mapping.Engine MappingEngine, which runs a definition over JSON input

Targets .NET 8, 9 and 10, plus .NET Standard 2.0 (which includes .NET Framework 4.6.2+).

Example

using System.Text.Json;
using System.Text.Json.Nodes;
using SpanFlow.Mapping.Core.Models;
using SpanFlow.Mapping.Engine;

var mapping = JsonSerializer.Deserialize<MappingDefinition>("""
{
  "target": {
    "type": "object",
    "mappings": [
      { "target": "profile.fullName",
        "transform": { "function": "concat", "args": [ "input.user.firstName", "' '", "input.user.lastName" ] } },
      { "target": "summary.completedAmount",
        "aggregate": { "function": "sum", "from": "input.orders[]",
                       "where": { "field": "status", "op": "eq", "value": "Completed" }, "select": "amount" } }
    ]
  }
}
""", new JsonSerializerOptions { PropertyNameCaseInsensitive = true })!;

var input = JsonNode.Parse("""
{ "user": { "firstName": "Ada", "lastName": "Lovelace" },
  "orders": [ { "status": "Completed", "amount": 100 }, { "status": "Pending", "amount": 50 } ] }
""");

JsonNode output = new MappingEngine().Execute(mapping, input);
// {"profile":{"fullName":"Ada Lovelace"},"summary":{"completedAmount":100}}

Notes for .NET Framework / .NET Standard 2.0

  • IANA time zone ids (America/New_York) and Windows ids both work on every target; on .NET Standard 2.0 they are resolved through the TimeZoneConverter package.
  • .NET Framework's double.Parse is not correctly rounded, so a few extreme values (such as 1e300) can come back one unit in the last place off from what .NET 8+ produces. Integers and decimals are unaffected.

Licence

MIT. These two libraries are MIT-licensed; the rest of SpanFlow is published under FSL-1.1-ALv2.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  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 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 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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on SpanFlow.Mapping.Engine:

Package Downloads
SpanFlow.Mapping.Formats

Reads and writes the wire formats around a SpanFlow mapping: the raw input is decoded into JSON, the mapping engine runs unchanged, and the result is encoded into the output format. MappingRunner does all three.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.0 57 11/18/2026
1.0.1 85 11/9/2026
1.0.0 88 11/6/2026