pub fn parse_registry_data(bytes: &[u8]) -> Result<Value, ServiceError>Expand description
Parse registry data bytes into a Value tree.
The parsing backend is version-dependent (currently RON). This function is the single point of parsing: plugins that use it automatically get support for new data formats when the crate is upgraded.
§Examples
use openstranded_common_wasmcontract::parse_registry_data;
// Named struct (common in data files)
let bytes = b"[ItemDef(id: 1, name: \"Wood\")]";
let data = parse_registry_data(bytes).unwrap();