Class Structs (2.38.1)

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
Name Description
struct Struct
Returns
Type Description
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
Name Description
map Map<String,?>
Returns
Type Description
Struct