BO4E - Business Objects for Energy
Rust implementation of the BO4E standard for data exchange in the German energy industry.
Quick Start
use *;
// Create a meter
let meter = Meter ;
// Serialize to German JSON (BO4E standard)
let json = to_json_german.unwrap;
println!;
// Deserialize
let mut bytes = json.into_bytes;
let parsed: Meter = from_json.unwrap;
assert_eq!;
Crate Structure
- [
bo] - Business Objects (Meter, MarketLocation, Contract, etc.) - [
com] - Components (Address, Price, MeterReading, etc.) - [
enums] - Enumerations (Division, MeterType, ContractStatus, etc.)
Serialization
BO4E uses German field names in JSON by default to maintain compatibility
with the standard. Use [to_json_english] for English field names.
use *;
let meter = default;
// German (standard)
let german = to_json_german.unwrap;
// English
let english = to_json_english.unwrap;
Performance
This crate uses simd-json for
SIMD-accelerated JSON parsing. For best performance, use [from_json]
with a mutable byte slice.
Related Projects
- BO4E-Python - Python implementation
- BO4E-Schemas - JSON schemas
- bo4e.de - Official website