aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/struct.proto
diff options
context:
space:
mode:
Diffstat (limited to 'src/google/protobuf/struct.proto')
-rw-r--r--src/google/protobuf/struct.proto28
1 files changed, 16 insertions, 12 deletions
diff --git a/src/google/protobuf/struct.proto b/src/google/protobuf/struct.proto
index cd102731..87783fea 100644
--- a/src/google/protobuf/struct.proto
+++ b/src/google/protobuf/struct.proto
@@ -45,6 +45,8 @@ option objc_class_prefix = "GPB";
// scripting languages like JS a struct is represented as an
// object. The details of that representation are described together
// with the proto support for the language.
+//
+// The JSON representation for `Struct` is JSON object.
message Struct {
// Map of dynamically typed values.
map<string, Value> fields = 1;
@@ -54,37 +56,39 @@ message Struct {
// null, a number, a string, a boolean, a recursive struct value, or a
// list of values. A producer of value is expected to set one of that
// variants, absence of any variant indicates an error.
+//
+// The JSON representation for `Value` is JSON value.
message Value {
+ // The kind of value.
oneof kind {
// Represents a null value.
NullValue null_value = 1;
-
// Represents a double value.
double number_value = 2;
-
// Represents a string value.
string string_value = 3;
-
// Represents a boolean value.
bool bool_value = 4;
-
// Represents a structured value.
Struct struct_value = 5;
-
// Represents a repeated `Value`.
ListValue list_value = 6;
}
}
+// `NullValue` is a singleton enumeration to represent the null value for the
+// `Value` type union.
+//
+// The JSON representation for `NullValue` is JSON `null`.
+enum NullValue {
+ // Null value.
+ NULL_VALUE = 0;
+}
+
// `ListValue` is a wrapper around a repeated field of values.
+//
+// The JSON representation for `ListValue` is JSON array.
message ListValue {
// Repeated field of dynamically typed values.
repeated Value values = 1;
}
-
-// `NullValue` is a singleton enumeration to represent the null
-// value for the `Value` type union.
-enum NullValue {
- // Null value.
- NULL_VALUE = 0;
-}