Struct class final

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.

Inheritance

Constructors

Struct({Map<String, Value> fields = const {}})
Struct.fromJson(Object? json)
factory

Properties

fields → Map<String, Value>
Unordered map of dynamically typed values.
final
hashCode → int
The hash code for this object.
no setterinherited
qualifiedName → String
The fully qualified name of this message, i.e., google.protobuf.Duration or google.rpc.ErrorInfo.
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Object
override
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Constants

fullyQualifiedName → const String