Class Structs (2.33.0)

public final class Structs

This class contains static utility methods that operate on or return protobuf's Struct objects. This is considered an internal class and implementation detail.

Inheritance

java.lang.Object > Structs

Static Methods

asMap(Struct struct)

public static Map<String,Object> asMap(Struct struct)

Returns an unmodifiable map view of the Struct parameter.

Parameter
NameDescription
structStruct
Returns
TypeDescription
Map<String,Object>

newStruct(Map<String,?> map)

public static Struct newStruct(Map<String,?> map)

Creates a new Struct object given the content of the provided map parameter.

Notice that all numbers (int, long, float and double) are serialized as double values. Enums are serialized as strings.

Parameter
NameDescription
mapMap<String,?>
Returns
TypeDescription
Struct