You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+58-9Lines changed: 58 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -98,25 +98,74 @@ Nullable string.
98
98
99
99
Will marshal to a blank string if null. Blank string input produces a null String. Null values and zero values are considered equivalent. Can unmarshal from `sql.NullString` JSON input.
100
100
101
+
#### zero.Bool
102
+
Nullable bool.
103
+
104
+
Will marshal to false if null. `false` produces a null Float. Null values and zero values are considered equivalent. Can unmarshal from `sql.NullBool` JSON input.
105
+
106
+
#### zero.Time
107
+
108
+
Will marshal to the zero time if null. Uses `time.Time`'s marshaler. Can unmarshal from `pq.NullTime` and similar JSON input.
109
+
110
+
#### zero.Float32
111
+
Nullable float32.
112
+
113
+
Will marshal to 0 if null. 0.0 produces a null Float32. Null values and zero values are considered equivalent. Can unmarshal from `zero.NullFloat32` JSON input.
114
+
115
+
#### zero.Float64
116
+
Nullable float64.
117
+
118
+
Will marshal to 0 if null. 0.0 produces a null Float64. Null values and zero values are considered equivalent. Can unmarshal from `sql.NullFloat64` JSON input.
119
+
101
120
#### zero.Int
121
+
Nullable int.
122
+
123
+
Will marshal to 0 if null. 0 produces a null Int. Null values and zero values are considered equivalent. Can unmarshal from `zero.NullInt` JSON input.
124
+
125
+
#### zero.Int8
126
+
Nullable int8.
127
+
128
+
Will marshal to 0 if null. 0 produces a null Int8. Null values and zero values are considered equivalent. Can unmarshal from `zero.NullInt8` JSON input.
129
+
130
+
#### zero.Int16
131
+
Nullable int16.
132
+
133
+
Will marshal to 0 if null. 0 produces a null Int16. Null values and zero values are considered equivalent. Can unmarshal from `zero.NullInt16` JSON input.
134
+
135
+
#### zero.Int32
136
+
Nullable int32.
137
+
138
+
Will marshal to 0 if null. 0 produces a null Int32. Null values and zero values are considered equivalent. Can unmarshal from `zero.NullInt32` JSON input.
139
+
140
+
#### zero.Int64
102
141
Nullable int64.
103
142
104
-
Will marshal to 0 if null. 0 produces a null Int. Null values and zero values are considered equivalent. Can unmarshal from `sql.NullInt64` JSON input.
143
+
Will marshal to 0 if null. 0 produces a null Int64. Null values and zero values are considered equivalent. Can unmarshal from `sql.NullInt64` JSON input.
105
144
106
-
#### zero.Float
107
-
Nullable float64.
145
+
#### zero.Uint
146
+
Nullable uint.
108
147
109
-
Will marshal to 0 if null. 0.0 produces a null Float. Null values and zero values are considered equivalent. Can unmarshal from `sql.NullFloat64` JSON input.
148
+
Will marshal to 0 if null. 0 produces a null Uint. Null values and zero values are considered equivalent. Can unmarshal from `zero.NullUint` JSON input.
110
149
111
-
#### zero.Bool
112
-
Nullable bool.
150
+
#### zero.Uint8
151
+
Nullable uint8.
113
152
114
-
Will marshal to false if null. `false` produces a null Float. Null values and zero values are considered equivalent. Can unmarshal from `sql.NullBool` JSON input.
153
+
Will marshal to 0 if null. 0 produces a null Uint8. Null values and zero values are considered equivalent. Can unmarshal from `zero.NullUint8` JSON input.
115
154
116
-
#### zero.Time
155
+
#### zero.Uint16
156
+
Nullable uint16.
117
157
118
-
Will marshal to the zero time if null. Uses `time.Time`'s marshaler. Can unmarshal from `pq.NullTime` and similar JSON input.
158
+
Will marshal to 0 if null. 0 produces a null Uint16. Null values and zero values are considered equivalent. Can unmarshal from `zero.NullUint16` JSON input.
159
+
160
+
#### zero.Uint32
161
+
Nullable uint32.
162
+
163
+
Will marshal to 0 if null. 0 produces a null Uint32. Null values and zero values are considered equivalent. Can unmarshal from `zero.NullUint32` JSON input.
164
+
165
+
#### zero.Uint64
166
+
Nullable uint64.
119
167
168
+
Will marshal to 0 if null. 0 produces a null Uint64. Null values and zero values are considered equivalent. Can unmarshal from `zero.NullUint64` JSON input.
120
169
121
170
### Bugs
122
171
`json`'s `",omitempty"` struct tag does not work correctly right now. It will never omit a null or empty String. This might be [fixed eventually](https://github.com/golang/go/issues/4357).
0 commit comments