Skip to main content

convert_bytes

Function convert_bytes 

Source
pub fn convert_bytes(input: &[u8], from: &str, to: &str) -> Result<Vec<u8>>
Expand description

Convert bytes from one format to another.

ยงExample

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