Skip to content

jwknopper/OpenMath-JSON

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenMath-JSON

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 Docker Build tkw01536/openmath-json-demo:

docker run -p 3000:3000 tkw01536/openmath-json-demo

License

CC-BY-3.0. See LICENSE.

About

A Proposal for an OpenMath JSON Encoding

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 48.1%
  • TypeScript 35.8%
  • JavaScript 15.3%
  • Other 0.8%