On Fri, Dec 6, 2019 at 2:38 AM Ryan Skraba <r...@skraba.com> wrote: > Naively, I would expect any JSON encoded data to be a valid default > value (which is not what the spec says). Does anyone know why the > "first schema only" rule was added to the spec? >
I think we felt this would make things simpler. That specifying a mechanism for resolving the ambiguities in the JSON representations of ints and longs, floats and doubles, strings and bytes, records and maps, etc. would make implementation and comprehension more difficult. In retrospect, it might have been better to use the type-tagged format specified of the "JSON Encoding" section for default values. This may be a historical artifact. If default values were added to Avro before the JSON encoding, then the concept of the type tagging would not have been in the spec when default values were defined. However changing the format of default values after they were defined would create a breaking incompatibility. That said, I don't recall anyone ever suggesting this improvement before. Doug