KalleOlaviNiemitalo commented on PR #1067:
URL: https://github.com/apache/avro/pull/1067#issuecomment-1750709991
I tried implementing `"symbol-props"` in my doc generator application. It
is a bit easier with the map style
```JSON
{
"type": "enum",
"symbols": ["zero", "one", "two"],
"symbol-props": {
"zero": {},
"one": { "doc": "uno" }
}
}
```
than with the array style
```JSON
{
"type": "enum",
"symbols": ["zero", "one", "two"],
"symbol-props": [
{ "name": "zero" },
{ "name": "one", "doc": "uno" }
]
}
```
because my application can loop over the value of `"symbols"` and use a JSON
DOM method to easily look up the corresponding entry from the `"symbol-props"`
map. In the array style, the symbol names are in the `"name"` properties, and
my application has to construct a dictionary from those before it starts
looping over `"symbols"`.
But perhaps consistency with record schemas is more important than
convenience here.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]