This is an automated email from the ASF dual-hosted git repository.
fokko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/avro.git
The following commit(s) were added to refs/heads/master by this push:
new 563c246 AVRO-2574: Add a default value to the spec (#662)
563c246 is described below
commit 563c246628612287364a2e6596826831fab006e3
Author: Fokko Driesprong <[email protected]>
AuthorDate: Tue Oct 1 09:10:54 2019 +0300
AVRO-2574: Add a default value to the spec (#662)
---
doc/src/content/xdocs/spec.xml | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/doc/src/content/xdocs/spec.xml b/doc/src/content/xdocs/spec.xml
index 466cd73..5ed95cb 100644
--- a/doc/src/content/xdocs/spec.xml
+++ b/doc/src/content/xdocs/spec.xml
@@ -183,7 +183,8 @@
</ul>
<p>For example, playing card suits might be defined with:</p>
<source>
-{ "type": "enum",
+{
+ "type": "enum",
"name": "Suit",
"symbols" : ["SPADES", "HEARTS", "DIAMONDS", "CLUBS"]
}
@@ -199,7 +200,13 @@
</ul>
<p>For example, an array of strings is declared
with:</p>
- <source>{"type": "array", "items": "string"}</source>
+ <source>
+{
+ "type": "array",
+ "items" : "string",
+ "default": []
+}
+ </source>
</section>
<section>
@@ -212,7 +219,13 @@
<p>Map keys are assumed to be strings.</p>
<p>For example, a map from string to long is declared
with:</p>
- <source>{"type": "map", "values": "long"}</source>
+ <source>
+{
+ "type": "map",
+ "items" : "long",
+ "default": {}
+}
+ </source>
</section>
<section>