public class JsonToProtoMessage extends Object
| Constructor and Description |
|---|
JsonToProtoMessage() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
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.
|
public static com.google.protobuf.DynamicMessage convertJsonToProtoMessage(com.google.protobuf.Descriptors.Descriptor protoSchema,
org.json.JSONObject json)
throws IllegalArgumentException
protoSchema - json - IllegalArgumentException - when JSON data is not compatible with proto descriptor.public static com.google.protobuf.DynamicMessage convertJsonToProtoMessage(com.google.protobuf.Descriptors.Descriptor protoSchema,
TableSchema tableSchema,
org.json.JSONObject json)
throws IllegalArgumentException
protoSchema - tableSchema - bigquery table schema is needed for type conversion of DATETIME, TIME,
NUMERIC, BIGNUMERICjson - IllegalArgumentException - when JSON data is not compatible with proto descriptor.Copyright © 2023 Google LLC. All rights reserved.