Expand description
fastsnbt
aims for fast deserializing and serializing of
sNBT data from Minecraft: Java Edition.
This is the human-readable equivalent of NBT data. (see
fastnbt
).
- For documentation of serde (de)serialization, see
ser
andde
. - See
fastnbt
for most NBT related things.
Example
#[derive(Debug, PartialEq, Serialize, Deserialize)]
struct SimpleStruct {
num: i64,
s: String,
}
let data = SimpleStruct {
num: 31300,
s: "Hello world!".into(),
};
let ser = fastsnbt::to_string(&data).unwrap();
assert_eq!("{\"num\":31300l,\"s\":\"Hello world!\"}", ser);
let input = "{num:31300L,s:\"Hello world!\"}";
let de: SimpleStruct = fastsnbt::from_str(input).unwrap();
assert_eq!(data, de);
Modules
- This module contains a serde deserializer. It can do most of the things you would expect of a typical serde deserializer, such as deserializing into: