murex Shell Docs

Data-Type Reference: mxjson

Murex-flavoured JSON (primitive)

Description

mxjson is an extension to JSON designed to integrate more seamlessly when use as a configuration file. Thus mxjson supports comments and murex code blocks embedded into the JSON schema.

mxjson is a format that is pre-parsed into a valid JSON format.

mxjson isn't currently a proper murex data-type in that you cannot marshal and unmarshal mxjson files. Currently it is a format that is only supported by a small subset of murex builtins (eg config and autocomplete) where config might embed murex code blocks.

mxjson features the following enhancements:

Line Comments

Line comments are prefixed with a 'hash', #, just like with regular murex code.

Block Quotation

Code blocks are quoted with (, ). For example, below "ExampleFunction" uses the ({ block quote }) method.

{
    "ExampleFunction": ({
        out: "This is an example _murex_ function"
        if { =1==2 } then {
            err: "The laws of the universe are broken"
        }
    })
}

Any block quoted by this method will be converted to the following valid JSON:

{
    "ExampleFunction": "\n    out: \"This is an example _murex_ function\"\n    if { =1==2 } then {\n        err: \"The laws of the universe are broken\"\n    }"
}

See Also

This site is rebuilt weekly, the content is automatically generated from murex's source code. Last built on Mon May 25 06:11:51 UTC 2020 against commit aa3f3b7aa3f3b7e471543754fdcaf910d4920cad9112b91. Downloadable murex binaries are also built weekly. Current version is 0.48.0120 BETA which has been verified against 29375 tests.