proto library Client - Class Struct (v5.36.2)

Reference documentation and code samples for the proto library Client class Struct.

Represents a JSON object.

An unordered key-value map, intending to perfectly capture the semantics of a JSON object. This enables parsing any arbitrary JSON payload as a message field in ProtoJSON format. This follows RFC 8259 guidelines for interoperable JSON: notably this type cannot represent large Int64 values or NaN/Infinity numbers, since the JSON format generally does not support those values in its number type. If you do not intend to parse arbitrary JSON into your message, a custom typed message should be preferred instead of using this type.

Generated from protobuf message google.protobuf.Struct

Namespace

Google \ Protobuf

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ fields array|Internal\MapField

Unordered map of dynamically typed values.

getFields

Unordered map of dynamically typed values.

Returns
Type Description
Internal\MapField

setFields

Unordered map of dynamically typed values.

Parameter
Name Description
var array|Internal\MapField
Returns
Type Description
$this