Class JsonToProtoMessage
- java.lang.Object
-
- com.google.cloud.bigquery.storage.v1beta2.JsonToProtoMessage
-
public class JsonToProtoMessage extends Object
Converts Json data to protocol buffer messages given the protocol buffer descriptor. The protobuf descriptor must have all fields lowercased.
-
-
Constructor Summary
Constructors Constructor Description JsonToProtoMessage()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static com.google.protobuf.DynamicMessage
convertJsonToProtoMessage(com.google.protobuf.Descriptors.Descriptor protoSchema, TableSchema tableSchema, org.json.JSONObject json)
Converts Json data to protocol buffer messages given the protocol buffer descriptor.static com.google.protobuf.DynamicMessage
convertJsonToProtoMessage(com.google.protobuf.Descriptors.Descriptor protoSchema, org.json.JSONObject json)
Converts Json data to protocol buffer messages given the protocol buffer descriptor.
-
-
-
Method Detail
-
convertJsonToProtoMessage
public static com.google.protobuf.DynamicMessage convertJsonToProtoMessage(com.google.protobuf.Descriptors.Descriptor protoSchema, org.json.JSONObject json) throws IllegalArgumentException
Converts Json data to protocol buffer messages given the protocol buffer descriptor.- Parameters:
protoSchema
-json
-- Throws:
IllegalArgumentException
- when JSON data is not compatible with proto descriptor.
-
convertJsonToProtoMessage
public static com.google.protobuf.DynamicMessage convertJsonToProtoMessage(com.google.protobuf.Descriptors.Descriptor protoSchema, TableSchema tableSchema, org.json.JSONObject json) throws IllegalArgumentException
Converts Json data to protocol buffer messages given the protocol buffer descriptor.- Parameters:
protoSchema
-tableSchema
- bigquery table schema is needed for type conversion of DATETIME, TIME, NUMERIC, BIGNUMERICjson
-- Throws:
IllegalArgumentException
- when JSON data is not compatible with proto descriptor.
-
-