mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-11 15:37:27 +00:00
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:
21
tests/optional_scalars.json
Normal file
21
tests/optional_scalars.json
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
just_i8: 4,
|
||||
maybe_u8: 0,
|
||||
default_u8: 0,
|
||||
just_i16: 4,
|
||||
maybe_u16: 0,
|
||||
default_u16: 0,
|
||||
just_i32: 4,
|
||||
maybe_u32: 0,
|
||||
default_u32: 0,
|
||||
just_i64: 4,
|
||||
maybe_u64: 0,
|
||||
default_u64: 0,
|
||||
just_f32: 4.0,
|
||||
maybe_f64: 0.0,
|
||||
default_f64: 0.0,
|
||||
just_bool: true,
|
||||
default_bool: false,
|
||||
maybe_enum: "One",
|
||||
default_enum: "Two"
|
||||
}
|
||||
Reference in New Issue
Block a user