Azalea Chat

Things for working with Minecraft formatted text components.

Examples

``` // convert a Minecraft formatted text JSON into colored text that can be printed to the terminal.

use azaleachat::FormattedText; use serdejson::Value; use serde::Deserialize;

let j: Value = serdejson::fromstr( r#"{"text": "hello","color": "red","bold": true}"# ) .unwrap(); let text = FormattedText::deserialize(&j).unwrap(); asserteq!( text.toansi(), "\u{1b}[1m\u{1b}[38;2;255;85;85mhello\u{1b}[m" ); ```