github.com/lmorg/murex@v0.0.0-20240217211045-e081c89cd4ef/docs/types/yaml.md (about)

     1  # `yaml`
     2  
     3  > YAML Ain't Markup Language (YAML)
     4  
     5  ## Description
     6  
     7  YAML support within Murex is pretty mature however it is not considered a
     8  primitive. Which means, while it is a recommended builtin which you should
     9  expect in most deployments of Murex, it's still an optional package and
    10  thus may not be present in some edge cases. This is because it relies on
    11  external source packages for the shell to compile.
    12  
    13  ## Default Associations
    14  
    15  * **Extension**: `yaml`
    16  * **Extension**: `yml`
    17  * **MIME**: `application/x-yaml`
    18  * **MIME**: `application/yaml`
    19  * **MIME**: `text/x-yaml`
    20  * **MIME**: `text/yaml`
    21  
    22  
    23  ## Supported Hooks
    24  
    25  * `Marshal()`
    26      Supported
    27  * `ReadArray()`
    28      Works with YAML arrays. Maps are converted into arrays
    29  * `ReadArrayWithType()`
    30      Works with YAML arrays. Maps are converted into arrays. Element type returned in Murex should match element type in YAML
    31  * `ReadIndex()`
    32      Works against all properties in YAML
    33  * `ReadMap()`
    34      Works with YAML maps
    35  * `ReadNotIndex()`
    36      Works against all properties in YAML
    37  * `Unmarshal()`
    38      Supported
    39  * `WriteArray()`
    40      Works with YAML arrays
    41  
    42  ## See Also
    43  
    44  * [`[[ Element ]]`](../parser/element.md):
    45    Outputs an element from a nested structure
    46  * [`cast`](../commands/cast.md):
    47    Alters the data type of the previous function without altering it's output
    48  * [`format`](../commands/format.md):
    49    Reformat one data-type into another data-type
    50  * [`json`](../types/json.md):
    51    JavaScript Object Notation (JSON)
    52  * [`jsonl`](../types/jsonl.md):
    53    JSON Lines
    54  * [`open`](../commands/open.md):
    55    Open a file with a preferred handler
    56  * [`runtime`](../commands/runtime.md):
    57    Returns runtime information on the internal state of Murex
    58  * [index](../parser/item-index.md):
    59    Outputs an element from an array, map or table
    60  
    61  ### Read more about type hooks
    62  
    63  - [`ReadIndex()` (type)](../apis/ReadIndex.md): Data type handler for the index, `[`, builtin
    64  - [`ReadNotIndex()` (type)](../apis/ReadNotIndex.md): Data type handler for the bang-prefixed index, `![`, builtin
    65  - [`ReadArray()` (type)](../apis/ReadArray.md): Read from a data type one array element at a time
    66  - [`WriteArray()` (type)](../apis/WriteArray.md): Write a data type, one array element at a time
    67  - [`ReadMap()` (type)](../apis/ReadMap.md): Treat data type as a key/value structure and read its contents
    68  - [`Marshal()` (type)](../apis/Marshal.md): Converts structured memory into a structured file format (eg for stdio)
    69  - [`Unmarshal()` (type)](../apis/Unmarshal.md): Converts a structured file format into structured memory
    70  
    71  <hr/>
    72  
    73  This document was generated from [builtins/types/yaml/yaml_doc.yaml](https://github.com/lmorg/murex/blob/master/builtins/types/yaml/yaml_doc.yaml).