Skip to main content

Crosswalk

Crosswalk maps one JSON shape onto another. The shape you have goes on the left, the shape you want goes on the right, and you draw the lines between them. A line straight across copies a field. A line through an operator changes it on the way, such as joining two names, comparing a value or adding up a list.

Loading the editor…

This map takes a person and their phone calls and builds a profile. It joins the first and last name, works out an age, only copies the zip code when it's a number, and totals the calls into national and international.

The packages​

PackageWhat it does
@crosswalkjs/coreHolds the map format and the operators, checks maps and runs them. No UI and no dependencies, so it runs in Node or the browser.
@crosswalkjs/canvasThe editor above. Plain DOM, so it works with any framework or none.
Crosswalk.CoreRuns maps in .NET 8 and later, with the same behaviour as the JavaScript core. See Running maps in .NET.

The editor saves a map as plain JSON. You can keep it in git, load it on a server and run it there with only the core package, in JavaScript or .NET.

What it doesn't do​

Crosswalk is at 0.1. The map format is versioned ("version": 1), but the JavaScript API may still change before 1.0. It reads JSON Schema for shape (type, properties, items, required and local $refs), not for validation, so rules such as pattern or minimum are ignored, and a $ref to another file isn't followed.

Where to go next​