toon-format 0.4.5

Token-Oriented Object Notation (TOON) - a token-efficient JSON alternative for LLM prompts
Documentation
use serde_json::{
    json,
    Value,
};
use toon_format::{
    decode_default,
    encode_default,
};

#[test]
fn test_unicode_strings() {
    let unicode = json!({
        "emoji": "πŸ˜€πŸŽ‰πŸ¦€",
        "chinese": "δ½ ε₯½δΈ–η•Œ",
        "arabic": "Ω…Ψ±Ψ­Ψ¨Ψ§",
        "mixed": "Hello δΈ–η•Œ 🌍"
    });

    let encoded = encode_default(&unicode).unwrap();
    let decoded: Value = decode_default(&encoded).unwrap();
    assert_eq!(unicode, decoded);
}