Skip to main content

to_string_with

Function to_string_with 

Source
pub fn to_string_with<T: Serialize>(
    value: &T,
    options: TjsonOptions,
) -> Result<String>
Expand description

Serialize value to a TJSON string using the given options.

let s = tjson::to_string_with(&vec![1, 2, 3], tjson::TjsonOptions::default()).unwrap();
assert_eq!(s, "  1, 2, 3");