encoding

Function

The encoding command configures an encoding format for data packets to be sent.

The undo encoding command restores the default encoding format for data packets to be sent.

By default, the encoding format is GPB.

Format

encoding { gpb | json }

undo encoding

undo encoding { gpb | json }

Parameters

Parameter Description Value
gpb

Configures the GPB encoding format for data packets to be sent.

-

json

Configures the JSON encoding format for data packets to be sent.

-

Views

Subscription view

Default Level

3: Management level

Task Name and Operations

Task Name Operations
telemetry write

Usage Guidelines

Usage Scenario

When you create a gRPC- or UDP-based static subscription, run the encoding command to configure an encoding format for data packets to be sent.

Example

# Configure the JSON encoding format for data packets to be sent.
<HUAWEI> system-view
[~HUAWEI] telemetry
[~HUAWEI-telemetry] subscription test
[*HUAWEI-telemetry-subscription-test] encoding json
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >