JSLT
Everyones favorite XSLT but for json
Rust port for Schibsted's jslt
use Jslt;
use json;
Status: POC
There is very minial support for selectors, constants and for loops and no garantee this will continue any further in the current phase.
Quick support reference:
-
. -
.<name> -
.[<index>] -
.[<from> : <to>] -
if (<expr>) <expr> else <expr> -
let <name> = <expr> -
$<name> -
[for (<expr>) <expr>] -
{for (<expr>) <expr> : <expr>} -
def <name>(<name>, <name>...) <expr> -
// <anything up to end of line> -
{ <key> : <expr> } -
{ <key> : <expr>, * : . } -
5 * 7 + 23.2 -
7 < 5 -
7 < 5 and .foo == "yes"
Based on Quick reference
Current Goals:
- Create context for function registration and scopes for variables
- Enable
#![no_std]sooner than later for possible nodejs support *
* with std cargo flag for regular use.