Encoding Types
OcNOS supports the protobuf, JSON, and JSON-IETF encoding types for both the dial-in and dial-out gNMI subscription modes.
Protocol Buffers (protobuf)
Offers a compact binary serialization format for efficient encoding and transmission of structured telemetry data. Protobuf is optimized for performance and bandwidth efficiency.
JavaScript Object Notation
Provides a human-readable data interchange format commonly used for telemetry data representation. JavaScript Object Notation (JSON) encoding facilitates interoperability and ease of integration with various applications and tools. It adheres to the JSON specification outlined in RFC7159, employing relevant quoting. Consequently, string values are quoted while number values remain unquoted.
JSON-IETF
This variant of JSON encoding adheres to the IETF standards, ensuring consistency and compatibility with industry specifications. JSON_IETF encoded data conforms the rules outlined in RFC7951 for JSON serialization.
Encoding Limitations (Protobuf)
| • | Union (oneof) types are not supported in the Protobuf encoding. |
| • | Map types with complex (user-defined) keys are not supported in the Protobuf encoding. |
These limitations mean that if the user's YANG model (or data schema) uses oneof or maps keyed by complex types (e.g., composite objects), telemetry data under Protobuf encoding will not properly represent those constructs. Use JSON or JSON-IETF encoding as an alternative for the paths mentioned above where Protobuf encoding is not supported.