This is an automated email from the ASF dual-hosted git repository.
opwvhk pushed a commit to branch opwvhk-patch-1
in repository https://gitbox.apache.org/repos/asf/avro.git
The following commit(s) were added to refs/heads/opwvhk-patch-1 by this push:
new 9b4f5d096 AVRO-4027: Fix bug in JSON object syntax
9b4f5d096 is described below
commit 9b4f5d096ec67d567a7cc35baa8a99cfc4b8ab42
Author: Oscar Westra van Holthe - Kind <[email protected]>
AuthorDate: Wed Aug 7 11:08:13 2024 +0200
AVRO-4027: Fix bug in JSON object syntax
---
share/idl_grammar/org/apache/avro/idl/Idl.g4 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/share/idl_grammar/org/apache/avro/idl/Idl.g4
b/share/idl_grammar/org/apache/avro/idl/Idl.g4
index 7572e9cc3..81799bbb3 100644
--- a/share/idl_grammar/org/apache/avro/idl/Idl.g4
+++ b/share/idl_grammar/org/apache/avro/idl/Idl.g4
@@ -138,7 +138,7 @@ unionType: Union LBrace types+=fullType (Comma
types+=fullType)* RBrace;
jsonValue: jsonObject | jsonArray | jsonLiteral;
jsonLiteral: literal=(StringLiteral | IntegerLiteral | FloatingPointLiteral |
BTrue | BFalse | Null);
-jsonObject: LBrace jsonPairs+=jsonPair (Comma jsonPairs+=jsonPair)* RBrace;
+jsonObject: LBrace (jsonPairs+=jsonPair (Comma jsonPairs+=jsonPair)*)? RBrace;
jsonPair: name=StringLiteral Colon value=jsonValue;
jsonArray: LBracket (jsonValues+=jsonValue (Comma jsonValues+=jsonValue)*)?
RBracket;