Elwood.Core 0.7.19

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

Elwood

A functional, expression-oriented JSON transformation language combining JSONPath navigation, pipe operators, lambda expressions, and a rich standard library. Why functional? →

$.orders[*]
| where o => o.status == "confirmed" && o.total > 100
| select o => {
    id: o.id,
    customer: o.customerName.toUpper(),
    date: o.createdAt.dateFormat("yyyy-MM-dd"),
    priority: o.priority | match "high" => "URGENT", _ => "normal"
  }
| orderBy o => o.total desc
| take 10

Available as a .NET library (NuGet) and a TypeScript/JavaScript package (npm). Both implementations are behaviorally identical, validated by a shared conformance test suite.

📖 Syntax Reference →

🎮 Try it in the Playground →

Elwood Playground


Quick Start

TypeScript / JavaScript

npm install @elwood-lang/core
import { evaluate } from '@elwood-lang/core';

const data = {
  users: [
    { name: 'Alice', age: 30, active: true },
    { name: 'Bob', age: 17, active: true },
    { name: 'Charlie', age: 25, active: false },
  ]
};

const result = evaluate('$.users[*] | where u => u.active && u.age >= 18 | select u => u.name', data);
console.log(result.value); // ["Alice"]

.NET

dotnet add package Elwood.Core
dotnet add package Elwood.Json
using Elwood.Core;
using Elwood.Json;

var engine = new ElwoodEngine(JsonNodeValueFactory.Instance);
var input = JsonNodeValueFactory.Instance.Parse(json);

var result = engine.Evaluate("$.users[*] | where u => u.active | select u => u.name", input);
// result.Value contains the transformed JSON

CLI

Download a single binary (no runtime needed):

Platform Download
Windows elwood-win-x64.exe
macOS elwood-macos-x64
Linux elwood-linux-x64

Or install as a .NET tool: dotnet tool install --global Elwood.Cli

# Evaluate an expression
elwood eval "$.users[*] | where u => u.active" --input data.json

# Run a script
elwood run transform.elwood --input data.json

# Interactive REPL
elwood

# Pipe from stdin
echo '{"x": 42}' | elwood eval "$.x * 2"

API (Docker)

docker run -p 8080:8080 ghcr.io/max-favilli/elwood-api
curl -X POST http://localhost:8080/api/evaluate \
  -H "Content-Type: application/json" \
  -d '{"script": "$.users[*] | where u => u.active | select u => u.name", "input": {"users": [{"name": "Alice", "active": true}]}}'
# → {"success":true,"value":["Alice"],"diagnostics":[]}

Integrates with any iPaaS, workflow tool, or language via HTTP.


Language Features

Pipes

Data flows left-to-right through pipe operators:

$.items[*] | where x => x.price > 10 | select x => x.name | distinct | take 5

Pipe Operators

Operator Description
where Filter items by predicate
select Transform each item
selectMany Flatten nested arrays
orderBy Sort (multi-key, asc/desc)
groupBy Group by key → { key, items }
distinct Remove duplicates
take / skip Slice the array
takeWhile Take items while predicate is true
batch Chunk into groups of N
join SQL-style join (inner/left/right/full)
concat Join array into string
reduce General-purpose fold
count / sum / min / max Aggregation
first / last Single element (optional predicate)
any / all Boolean quantifiers
match Pattern matching
index Replace items with 0-based indices

Named Lambdas

x => x.name.toLower()
(acc, item) => acc + item.price

Let Bindings

let adults = $.users[*] | where u => u.age >= 18
let names = adults | select u => u.name
return { names: names, count: adults | count }

Pattern Matching

$.status | match
  "active" => "#00FF00",
  "retired" => "#FF0000",
  _ => "#999999"

Memoized Functions

let lookup = memo id => $.categories[*] | first c => c.id == id
$.items[*] | select i => { name: i.name, category: lookup(i.catId).name }

Iterate (Lazy Sequences)

iterate(1, x => x * 2) | take 5                    // [1, 2, 4, 8, 16]
iterate({a:0, b:1}, s => {a:s.b, b:s.a+s.b})       // Fibonacci
  | take 8 | select s => s.a                        // [0, 1, 1, 2, 3, 5, 8, 13]

Spread Operator & Computed Keys

{ ...original, newProp: "added", [dynamicKey]: computedValue }

70+ Built-in Methods

String, numeric, datetime, crypto, null-checks, object manipulation, regex, URL encoding, and more. See the syntax reference.


Performance

The .NET engine uses lazy evaluation — pipe operators stream elements without materializing intermediate arrays. take(10) on a 100K-element pipeline processes ~15 items, not 100K.

where|select|take(10) on 100K items:    0.02ms avg
Full pipeline on 200K items (~73MB):    ~2s, 41K rows/sec

Project Structure

Elwood/
├── spec/test-cases/      # 68 shared conformance test cases
├── dotnet/               # .NET implementation (C#)
│   ├── src/Elwood.Core/  # Parser, evaluator, built-in functions
│   ├── src/Elwood.Json/  # System.Text.Json adapter
│   └── src/Elwood.Cli/   # CLI tool
├── ts/                   # TypeScript implementation
│   └── src/              # Lexer, parser, evaluator, built-ins
└── docs/                 # Syntax reference, changelog, roadmap

Both implementations share the same conformance test suite (spec/test-cases/). Every test case includes an explanation file that serves as a tutorial.


Documentation


Building from Source

.NET

dotnet build dotnet/Elwood.slnx
dotnet test dotnet/tests/Elwood.Core.Tests/

TypeScript

cd ts
npm install
npm test

License

MIT

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 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.
  • net10.0

    • No dependencies.
  • net8.0

    • No dependencies.

NuGet packages (4)

Showing the top 4 NuGet packages that depend on Elwood.Core:

Package Downloads
Elwood.Json

System.Text.Json adapter for Elwood — the functional JSON transformation DSL.

Elwood.Pipeline

Pipeline YAML parser and executor for the Elwood JSON transformation DSL.

Elwood.Parquet

Parquet format support for the Elwood JSON transformation DSL. Optional extension — install only if you need Parquet I/O.

Elwood.Xlsx

XLSX (Excel) format support for the Elwood JSON transformation DSL. Optional extension — install only if you need Excel I/O.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.7.19 166 6/15/2026
0.7.18 120 6/12/2026
0.7.17 126 6/12/2026
0.7.16 170 5/27/2026
0.7.15 136 5/22/2026
0.7.14 188 5/14/2026
0.7.13 212 5/14/2026
0.7.12 200 5/13/2026
0.7.11 206 5/12/2026
0.7.10 189 5/12/2026
0.7.9 209 5/8/2026
0.7.8 213 4/29/2026
0.7.7 197 4/29/2026
0.7.6 194 4/22/2026
0.7.5 182 4/22/2026
0.7.4 180 4/21/2026
0.7.3 184 4/21/2026
0.7.2 182 4/20/2026
0.7.1 190 4/20/2026
0.7.0 186 4/20/2026
Loading failed