Commands¶
literalize¶
Convert data structures to native language literal syntax.
Usage
literalize [OPTIONS]
Options
- --version¶
Show the version and exit.
- -l, --language <language>¶
Required Target language for output.
- Options:
ada | bash | c | clojure | cobol | commonlisp | cpp | crystal | csharp | d | dart | elixir | erlang | fortran | fsharp | go | groovy | haskell | hcl | java | javascript | julia | kotlin | lua | matlab | mojo | nim | norg | objectivec | ocaml | occam | perl | php | powershell | python | r | racket | ruby | rust | scala | swift | toml | typescript | visualbasic | yaml | zig
- -f, --input-format <input_format>¶
Input data format.
- Options:
json | yaml
- --pre-indent-level <pre_indent_level>¶
Number of indent levels to prefix each output line with.
- --indent <indent>¶
Indentation string.
- --include-delimiters, --no-include-delimiters¶
Include opening/closing delimiters.
- --variable-name <variable_name>¶
Variable name for the output assignment.
- --new-variable, --no-new-variable¶
Declare a new variable.
- --error-on-coercion, --no-error-on-coercion¶
Error on heterogeneous type coercion.
- --sequence-format <sequence_format>¶
Sequence format (language-specific). Choices: array, cell_array, initializer_list, list, seq, sequence, slice, table, tuple, vec, vector.
- --set-format <set_format>¶
Set format (language-specific). Choices: btree_set, frozenset, hash_set, map_set, set, sorted_set, tree_set.
- --date-format <date_format>¶
Date format (language-specific). Choices: cpp, csharp, dart, elixir, erlang, fsharp, go, haskell, iso, java, js, julia, kotlin, lua, matlab, nim, objc, ocaml, perl, php, python, r, ruby, rust, scala, swift, toml, yaml, zig.
- --datetime-format <datetime_format>¶
Datetime format (language-specific). Choices: cpp, csharp, dart, elixir, epoch, erlang, fsharp, go, haskell, instant, iso, js, julia, kotlin, lua, matlab, nim, objc, ocaml, perl, php, python, r, ruby, rust, scala, swift, toml, yaml, zig, zoned.
- --bytes-format <bytes_format>¶
Bytes format (language-specific). Choices: binary, hex, python.
- --comment-format <comment_format>¶
Comment format (language-specific). Choices: apostrophe, block, double_dash, double_slash, exclamation, hash, paren_star, percent, semicolon, star_angle.
- --variable-type-hints <variable_type_hints>¶
Variable type hints (language-specific). Choices: always, auto.
- --empty-dict-key <empty_dict_key>¶
Empty dict key handling (language-specific). Choices: allow, error, positional.
- --line-ending <line_ending>¶
Line ending style (language-specific). Choices: none, semicolon.
- --default-dict-key-type <default_dict_key_type>¶
Default type for dict keys (language-specific, free-form string).
- --default-dict-value-type <default_dict_value_type>¶
Default type for dict values (language-specific, free-form string).
- --default-sequence-element-type <default_sequence_element_type>¶
Default type for sequence elements (language-specific, free-form string).
- --default-set-element-type <default_set_element_type>¶
Default type for set elements (language-specific, free-form string).
- --include-preamble, --no-include-preamble¶
Include language preamble (e.g. package declarations, imports).