Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

jsonata-ui-core

jsonata-ui2.3kMIT1.7.13TypeScript support: included

Core AST and serializers for jsonata-ui

jsonata

readme

jsonata-ui-core

npm version

Core AST and serializers for jsonata-ui

npm install jsonata-ui-core

The core library includes a serializer to turning JSONata ASTs back into strings.

import {serializer} from "jsonata-ui-core";
import jsonata from "jsonata"

const input = `a.b.c = "foo"`;
const ast = jsonata(input).ast();
const output = serializer(ast);
console.log("There and back again", input, output);

Edit jsonata serializer demo

Versions matching with JSONata

This library serializes ASTs, and aims to match versions numbers with jsonata-js. This is because the ASTs returned by jsonata vary significantly by version.

jsonata Jsonata-ui-core
1.7.x 1.7.x
<1.6.x Not supported

Not Implemented

  • Some operators not yet implemented
  • Complex thunk functions: λ($f) { λ($x) { $x($x) }( λ($g) { $f( (λ($a) {$g($g)($a)}))})}(λ($f) { λ($n) { $n < 2 ? 1 : $n * $f($n - 1) } })(6)
  • Regex: $matcher := /[a-z]*an[a-z]*/i
  • Partial function application ( $first5 := $substring(?, 0, 5); $first5("Hello, World") )
  • Transform operator: | Account.Order.Product | {'Price': Price * 1.2} |
  • Conditional without else: Account ? null vs Account ? null : true
  • Merged back into main jsonata-js package

    Sponsors

    Sponsored by SaaSquatch. Loyalty, point and referral programs for forward-looking companies.

changelog

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

1.7.13 - 2023-04-20

Updated

  • Updated license copyright to be in line with SaaSquatch open-source policy

1.7.12 - 2019-11-29

Updated

  • No release notes

1.7.11 - 2019-11-29

Updated

  • No release notes

1.7.10 - 2019-11-27

Updated

  • No release notes

1.7.9 - 2019-11-27

Updated

  • No release notes

1.7.8 - 2019-11-27

Updated

  • No release notes

1.7.7 - 2019-11-26

Updated

  • No release notes

1.7.6 - 2019-11-26

Updated

  • No release notes

1.7.5 - 2019-11-25

Updated

  • No release notes

1.7.4 - 2019-11-25

Updated

  • No release notes

1.7.2 - 2019-10-29

Updated

  • No release notes

1.7.1 - 2019-10-24

Updated

  • No release notes

1.7.0 - 2019-10-24

Updated

  • No release notes

1.0.1 - 2019-10-22

Added

  • Initial release