Implement optional scalars for JSON (#7322)

* Implement optional scalars for JSON

* Add optional scalars JSON test

* Extend JSON optional scalars test to test without defaults

* Fix optional scalars in JSON for binary schema

Co-authored-by: Caleb Zulawski <caleb.zulawski@caci.com>
This commit is contained in:
Caleb Zulawski
2022-06-14 18:00:24 -04:00
committed by GitHub
parent 090caa2809
commit a18ea40d6a
5 changed files with 132 additions and 10 deletions

View File

@@ -0,0 +1,38 @@
{
just_i8: 4,
maybe_i8: null,
default_i8: 42,
just_u8: 0,
maybe_u8: 0,
default_u8: 0,
just_i16: 4,
maybe_i16: null,
default_i16: 42,
just_u16: 0,
maybe_u16: 0,
default_u16: 0,
just_i32: 4,
maybe_i32: null,
default_i32: 42,
just_u32: 0,
maybe_u32: 0,
default_u32: 0,
just_i64: 4,
maybe_i64: null,
default_i64: 42,
just_u64: 0,
maybe_u64: 0,
default_u64: 0,
just_f32: 4.0,
maybe_f32: null,
default_f32: 42.0,
just_f64: 0.0,
maybe_f64: 0.0,
default_f64: 0.0,
just_bool: true,
maybe_bool: null,
default_bool: false,
just_enum: "None",
maybe_enum: "One",
default_enum: "Two"
}