Murex-flavoured JSON (primitive)
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 are prefixed with a ‘hash’, #
, just like with regular murex code.
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 }"
}
%(
, )
) Tokens: Initiates or terminates a string (variables expanded){
, }
) Tokens: Initiates or terminates a code blockMarshal()
(type): Converts structured memory into a structured file format (eg for stdio)Unmarshal()
(type): Converts a structured file format into structured memory[[
(element): Outputs an element from a nested structure[
(index): Outputs an element from an array, map or tableautocomplete
: Set definitions for tab-completion in the command linecast
: Alters the data type of the previous function without altering it’s outputconfig
: Query or define murex runtime settingsformat
: Reformat one data-type into another data-typehcl
: HashiCorp Configuration Language (HCL)json
: JavaScript Object Notation (JSON) (primitive)jsonc
: Concatenated JSONjsonl
: JSON Lines (primitive)open
: Open a file with a preferred handlerpretty
: Prettifies JSON to make it human readableruntime
: Returns runtime information on the internal state of murextoml
: Tom’s Obvious, Minimal Language (TOML)yaml
: YAML Ain’t Markup Language (YAML)This site's content is rebuilt automatically from murex's source code after each merge to the master
branch. Downloadable murex binaries are also built with the website.
Last built on Mon Feb 13 09:18:06 UTC 2023 against commit f339958f33995895c1d997efcdbb8408d2c8d45f8b5f934.
Current version is which has been verified against 13950 tests cases.