| ... | @@ -1239,7 +1239,7 @@ pub const Value = union(enum) { | ... | @@ -1239,7 +1239,7 @@ pub const Value = union(enum) { |
| 1239 | out_stream: var, | 1239 | out_stream: var, |
| 1240 | ) @TypeOf(out_stream).Error!void { | 1240 | ) @TypeOf(out_stream).Error!void { |
| 1241 | switch (value) { | 1241 | switch (value) { |
| 1242 | .Null => try out_stream.writeAll("null"), | 1242 | .Null => try stringify(null, options, out_stream), |
| 1243 | .Bool => |inner| try stringify(inner, options, out_stream), | 1243 | .Bool => |inner| try stringify(inner, options, out_stream), |
| 1244 | .Integer => |inner| try stringify(inner, options, out_stream), | 1244 | .Integer => |inner| try stringify(inner, options, out_stream), |
| 1245 | .Float => |inner| try stringify(inner, options, out_stream), | 1245 | .Float => |inner| try stringify(inner, options, out_stream), |
| ... | @@ -2414,11 +2414,14 @@ pub fn stringify( | ... | @@ -2414,11 +2414,14 @@ pub fn stringify( |
| 2414 | .Bool => { | 2414 | .Bool => { |
| 2415 | return out_stream.writeAll(if (value) "true" else "false"); | 2415 | return out_stream.writeAll(if (value) "true" else "false"); |
| 2416 | }, | 2416 | }, |
| | 2417 | .Null => { |
| | 2418 | return out_stream.writeAll("null"); |
| | 2419 | }, |
| 2417 | .Optional => { | 2420 | .Optional => { |
| 2418 | if (value) |payload| { | 2421 | if (value) |payload| { |
| 2419 | return try stringify(payload, options, out_stream); | 2422 | return try stringify(payload, options, out_stream); |
| 2420 | } else { | 2423 | } else { |
| 2421 | return out_stream.writeAll("null"); | 2424 | return try stringify(null, options, out_stream); |
| 2422 | } | 2425 | } |
| 2423 | }, | 2426 | }, |
| 2424 | .Enum => { | 2427 | .Enum => { |