@@ -12,34 +12,34 @@ Complies with [protojson](https://protobuf.dev/programming-guides/proto3/#json).
12
12
| -----------------| -------------------------------------| ------------------------------------|
13
13
| ` map<K, V> ` | ` { [string]: V } ` | All keys are converted to strings. |
14
14
| ` repeated V ` | ` [...V] ` | |
15
- | ` bool ` | ` bool ` | |
16
- | ` string ` | ` string ` | |
17
- | ` bytes ` | ` bytes ` | |
18
- | ` int32 ` | ` int32 ` | |
19
- | ` fixed32 ` | ` int32 ` | |
20
- | ` uint32 ` | ` uint32 ` | |
21
- | ` int64 ` | ` int64 ` | |
22
- | ` fixed64 ` | ` fixed64 ` | |
23
- | ` uint32 ` | ` uint64 ` | |
24
- | ` float ` | ` float32 ` | |
25
- | ` double ` | ` float64 ` | |
26
- | ` Any ` | ` null \| { "@type": string, ... } ` | |
27
- | ` Struct ` | ` null \| { [string]: _ } ` | |
28
- | ` Value ` | ` null \| _ ` | |
29
- | ` ListValue ` | ` null \| [...] ` | |
30
- | ` NullValue ` | ` null \| null ` | |
31
- | ` BoolValue ` | ` null \| bool ` | |
32
- | ` StringValue ` | ` null \| string ` | |
33
- | ` Int32Value ` | ` null \| int32 ` | |
34
- | ` UInt32Value ` | ` null \| uint32 ` | |
35
- | ` Int64Value ` | ` null \| int64 ` | |
36
- | ` UInt64Value ` | ` null \| uint64 ` | |
37
- | ` FloatValue ` | ` null \| float32 ` | |
38
- | ` DoubleValue ` | ` null \| double ` | |
39
- | ` Empty ` | ` null \| close({}) ` | |
40
- | ` Timestamp ` | ` null \| string ` | See the [ ` Timestamp ` ] ( #timestamp ) section for more information. |
41
- | ` Duration ` | ` null \| string ` | See the [ ` Duration ` ] ( #duration ) section for more information. |
42
- | ` FieldMask ` | ` null \| { paths: [...string] } ` | |
15
+ | ` bool ` | ` *false \| bool ` | |
16
+ | ` string ` | ` *"" \| string ` | |
17
+ | ` bytes ` | ` *'' \| bytes ` | |
18
+ | ` int32 ` | ` *0 \| int32 ` | |
19
+ | ` fixed32 ` | ` *0 \| int32 ` | |
20
+ | ` uint32 ` | ` *0 \| uint32 ` | |
21
+ | ` int64 ` | ` *0 \| int64 ` | |
22
+ | ` fixed64 ` | ` *0 \| fixed64 ` | |
23
+ | ` uint32 ` | ` *0 \| uint64 ` | |
24
+ | ` float ` | ` *0 \| float32 ` | |
25
+ | ` double ` | ` *0 \| float64 ` | |
26
+ | ` Any ` | ` * null \| { "@type": string, ... }` | |
27
+ | ` Struct ` | ` * null \| { [string]: _ }` | |
28
+ | ` Value ` | ` * null \| _` | |
29
+ | ` ListValue ` | ` * null \| [...]` | |
30
+ | ` NullValue ` | ` * null \| null` | |
31
+ | ` BoolValue ` | ` * null \| bool` | |
32
+ | ` StringValue ` | ` * null \| string` | |
33
+ | ` Int32Value ` | ` * null \| int32` | |
34
+ | ` UInt32Value ` | ` * null \| uint32` | |
35
+ | ` Int64Value ` | ` * null \| int64` | |
36
+ | ` UInt64Value ` | ` * null \| uint64` | |
37
+ | ` FloatValue ` | ` * null \| float32` | |
38
+ | ` DoubleValue ` | ` * null \| double` | |
39
+ | ` Empty ` | ` * null \| close({})` | |
40
+ | ` Timestamp ` | ` * null \| string` | See the [ ` Timestamp ` ] ( #timestamp ) section for more information. |
41
+ | ` Duration ` | ` * null \| string` | See the [ ` Duration ` ] ( #duration ) section for more information. |
42
+ | ` FieldMask ` | ` * null \| { paths: [...string] }` | |
43
43
44
44
### Message
45
45
57
57
58
58
``` cue
59
59
#Foo: {
60
- name: string
60
+ name: *"" | string
61
61
name: !="xxx"
62
- age: int32
62
+ age: *0 | int32
63
63
age: <100
64
+ ageNextYear: *0 | int32
64
65
ageNextYear: age+1
65
66
}
66
67
```
@@ -77,7 +78,7 @@ enum Bar {
77
78
To:
78
79
79
80
``` cue
80
- #Bar: #Bar_ZERO | #Bar_ONE
81
+ #Bar: * #Bar_ZERO | #Bar_ONE
81
82
82
83
#Bar_ZERO: "ZERO"
83
84
#Bar_ONE: "ONE"
0 commit comments