Skip to content
This repository was archived by the owner on Mar 2, 2026. It is now read-only.

Latest commit

 

History

History
50 lines (32 loc) · 1.7 KB

File metadata and controls

50 lines (32 loc) · 1.7 KB

OpenMath-JSON

CI Status

A Proposal for an OpenMath JSON encoding -- see doc/openmath.md for concrete examples and documentation.

The Encoding

The actual encoding can be found in src/schema/openmath.d.ts. It is implemented as a set of TypeScript Definitions.

It can also be compiled into a JSON Schema, for easy validation. This is achieved using ts-json-schema-generator. If yarn is installed locally, you can run:

# To install ts-json-schema-generator
yarn

# To generate a JSON Schema into src/schema/openmath.json
yarn saveschema

The Resulting File is committed in the repository.

Demo Website and Conversion to/from XML

Along with the encoding itself, this repository contains a TypeScript Implementation that can convert between the JSON and XML OpenMath encodings. This can be found in the src/convert/ folder.

Furthermore, an implementation that validates a given JSON object against the JSON Schema is also present. This is demonstrated in the form of a website and an API.

The demo website can be found at https://omjson.openmath.org.

The website can be run locally by typing:

cd server && yarn && yarn serveprod

or using the automated Github Package tkw1536/openmath-json-demo:

docker run -p 3000:3000 ghcr.io/tkw1536/openmath-json-demo:latest

License

CC-BY-3.0. See LICENSE.