Murex-flavoured JSON (deprecated)
This format has been deprecated in favour of
%{}
constructors.
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 a 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 }"
}
cast
): Alters the data-type of the previous function without altering its output[[ Element ]]
): Outputs an element from a nested structureopen
): Open a file with a preferred handlerformat
): Reformat one data-type into another data-typeconfig
): Query or define Murex runtime settingsruntime
): Returns runtime information on the internal state of Murexautocomplete
): Set definitions for tab-completion in the command line%(Brace Quote)
: Initiates or terminates a string (variables expanded)%[]
Array Builder: Quickly generate arrays%{}
Object Builder: Quickly generate objects (dictionaries / maps)hcl
: HashiCorp Configuration Language (HCL)json
: JavaScript Object Notation (JSON)jsonc
: Concatenated JSONjsonl
: JSON Linestoml
: Tom’s Obvious, Minimal Language (TOML)yaml
: YAML Ain’t Markup Language (YAML){ Curly Brace }
: Initiates or terminates a code blockReadIndex()
(type): Data type handler for the index, [
, builtinReadNotIndex()
(type): Data type handler for the bang-prefixed index, ![
, builtinReadArray()
(type): Read from a data type one array element at a timeWriteArray()
(type): Write a data type, one array element at a timeReadMap()
(type): Treat data type as a key/value structure and read its contentsMarshal()
(type): Converts structured memory into a structured file format (eg for stdio)Unmarshal()
(type): Converts a structured file format into structured memoryThis document was generated from builtins/types/json/mxjson_doc.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 Sat Nov 23 00:50:15 UTC 2024 against commit 69c17da69c17da3bd9db98ca508f6a03a402f074ee24cec.
Current version is 6.4.0375 (develop) which has been verified against tests cases.