ocpp/custom_data

The OCPP 2.x CustomData vendor-extension type.

In the schemas, CustomDataType is an open object: it carries a required vendorId plus arbitrary additional vendor-specific properties (it is the one type that does NOT get additionalProperties: false). vendor_id models the required property; every other property round-trips through extras as transport-neutral JsonValue pairs.

extras must not contain a "vendorId" key: the vendor_id field is authoritative, so the JSON codec drops such an entry on encode and never produces one on decode. Extras key order is not preserved by decoding (the codec returns them sorted by key); the values are semantically equal.

Types

pub type CustomData {
  CustomData(
    vendor_id: String,
    extras: List(#(String, json_value.JsonValue)),
  )
}

Constructors

Values

pub fn new(vendor_id: String) -> CustomData

A CustomData carrying only the required vendorId, with no vendor-specific extension properties.

Search Document