Skip to main content

Crate formatforge

Crate formatforge 

Source
Expand description

§formatforge

Convert between data formats: JSON, TOML, YAML, XML, ENV, KDL, CBOR, INI, JSON5, JSONC, MessagePack.

§Quick start

use formatforge::convert_bytes;

let json = br#"{"name": "test"}"#;
let toml = convert_bytes(json, "json", "toml").unwrap();

Modules§

formats

Functions§

cbor_to_cbor
cbor_to_env
cbor_to_ini
cbor_to_json
cbor_to_json5
cbor_to_jsonc
cbor_to_kdl
cbor_to_msgpack
cbor_to_toml
cbor_to_xml
cbor_to_yaml
convert_bytes
Convert bytes from one format to another.
convert_file
Convert a file to another format, detecting formats from file extensions.
decode
Decode bytes into a serde_json::Value.
encode
Encode a serde_json::Value into bytes of the given format.
env_to_cbor
env_to_env
env_to_ini
env_to_json
env_to_json5
env_to_jsonc
env_to_kdl
env_to_msgpack
env_to_toml
env_to_xml
env_to_yaml
ini_to_cbor
ini_to_env
ini_to_ini
ini_to_json
ini_to_json5
ini_to_jsonc
ini_to_kdl
ini_to_msgpack
ini_to_toml
ini_to_xml
ini_to_yaml
json5_to_cbor
json5_to_env
json5_to_ini
json5_to_json
json5_to_json5
json5_to_jsonc
json5_to_kdl
json5_to_msgpack
json5_to_toml
json5_to_xml
json5_to_yaml
json_to_cbor
json_to_env
json_to_ini
json_to_json
json_to_json5
json_to_jsonc
json_to_kdl
json_to_msgpack
json_to_toml
json_to_xml
json_to_yaml
jsonc_to_cbor
jsonc_to_env
jsonc_to_ini
jsonc_to_json
jsonc_to_json5
jsonc_to_jsonc
jsonc_to_kdl
jsonc_to_msgpack
jsonc_to_toml
jsonc_to_xml
jsonc_to_yaml
kdl_to_cbor
kdl_to_env
kdl_to_ini
kdl_to_json
kdl_to_json5
kdl_to_jsonc
kdl_to_kdl
kdl_to_msgpack
kdl_to_toml
kdl_to_xml
kdl_to_yaml
msgpack_to_cbor
msgpack_to_env
msgpack_to_ini
msgpack_to_json
msgpack_to_json5
msgpack_to_jsonc
msgpack_to_kdl
msgpack_to_msgpack
msgpack_to_toml
msgpack_to_xml
msgpack_to_yaml
toml_to_cbor
toml_to_env
toml_to_ini
toml_to_json
toml_to_json5
toml_to_jsonc
toml_to_kdl
toml_to_msgpack
toml_to_toml
toml_to_xml
toml_to_yaml
xml_to_cbor
xml_to_env
xml_to_ini
xml_to_json
xml_to_json5
xml_to_jsonc
xml_to_kdl
xml_to_msgpack
xml_to_toml
xml_to_xml
xml_to_yaml
yaml_to_cbor
yaml_to_env
yaml_to_ini
yaml_to_json
yaml_to_json5
yaml_to_jsonc
yaml_to_kdl
yaml_to_msgpack
yaml_to_toml
yaml_to_xml
yaml_to_yaml