Make JSON supporting advanced union features (#7869)

This change allows user to decode binary with given schema to JSON
representation when schema defines union with struct.

Co-authored-by: Derek Bailey <derekbailey@google.com>
This commit is contained in:
Adam Oleksy
2023-04-26 07:37:06 +02:00
committed by GitHub
parent d6d83c3a92
commit ab716ee41d
4 changed files with 37 additions and 1 deletions

View File

@@ -2584,7 +2584,8 @@ bool Parser::SupportsAdvancedUnionFeatures() const {
return (opts.lang_to_generate &
~(IDLOptions::kCpp | IDLOptions::kTs | IDLOptions::kPhp |
IDLOptions::kJava | IDLOptions::kCSharp | IDLOptions::kKotlin |
IDLOptions::kBinary | IDLOptions::kSwift | IDLOptions::kNim)) == 0;
IDLOptions::kBinary | IDLOptions::kSwift | IDLOptions::kNim |
IDLOptions::kJson)) == 0;
}
bool Parser::SupportsAdvancedArrayFeatures() const {