GRFON is a simpler and gentler file format compared to JSON and was designed to be especially human-editable. For information on the GRFON file specification, see: https://github.com/JoeStrout/grfon/blob/main/docs/README.md
Functions
Name |
Description
|
parse(string) |
convert a GRFON string into a MiniScript value (which could include a list or map of other values). This is the main entry point for reading GRFON data and converting it to native form.
|
escape(string) |
Escape any special characters in the given string by preceding them with backslashes.
|
unescape(string) |
Replaces backslash sequences in the given string with the appropriate character.
|
toGRFON((value, compact=false, indent=0, topLevel=true) |
Converts a value to GRFON syntax.
|
Properties
Name |
Description
|
interpretTrueAndFalse |
Flag to control whether strings "true" and "false" should be returned as 1 or 0, or left as strings.
|
interpretNull |
Similar flag for string "null".
|
Examples
s = toGRFON([1, 2, "foo"], true)