oa_gateway_uci::json

Function to_json

Source
pub fn to_json(message: &Message, schema: &Schema) -> Result<String, UciError>
Expand description

Serializes message as a single-key OMS JSON object.

A missing global element still uses Message::name as the type name, so a hand-built tree can be written.

ยงErrors

Returns UciError if flattening a type fails or nesting exceeds MAX_DEPTH.