Protobuf to JSON

Description

This operation converts events in Protobuf (Protocol Buffers) format into JSON. Protocol Buffers is a language-neutral, platform-neutral, extensible mechanism for serializing structured data. It's similar to JSON, but smaller and faster.


Data types

These are the input/output expected data types for this operation:

Input data

- Protobuf-formatted strings you want to transform into JSON. These must be encoded in Base64 format. You can use the To Base64 operation to transform your input strings.

Output data

- Resulting JSON-formatted strings.


Parameters

These are the parameters you need to configure to use this operation (mandatory parameters are marked with a *):

Proto file*

The proto file is the file that defines the message structure of the data you want to transform into JSON. Note that these must be formatted in Base64 or as plain text. You can use the To Base64 operation to transform your input strings.

A common proto file has this structure:

syntax = "proto3";

message User {
  string username = 1;
  int32 age = 2;
}
Message type*

Enter the specific part of the message in the proto file that you want to transform into JSON format.

For example, in this proto file:

syntax = "proto3";

package company;

message Employee {
  int32 id = 1;
  string name = 2;
  string role = 3;
}

message Department {
  string name = 1;
  repeated Employee employees = 2;
}

Enter Employee or Department to extract one of the messages.

Last updated

Was this helpful?