I think this would be the ideal approach assuming there isn't too much
overhead in maintaining different parsers and keeping them in sync. We
wouldn't want to end up in the situation where the parsers start drifting
and it could end up being a lot of work to maintain test cases for all the
different permutations.

--
Michael Mior
[email protected]

2016-06-06 19:55 GMT-04:00 Julian Hyde <[email protected]>:

> YAML isn’t an aside — thanks for raising it. Along with JSON and HOCON,
> YAML is another viable language for writing model files.
>
> I think any of these formats would plug into ModelHandler quite easily,
> because they all produce data in the JSON model. And performance isn’t
> important, because the model is only read once. The real point is what
> format our users prefer using.
>
> Maybe we don’t even have to choose: we could allow models with .json,
> .yaml and .conf suffixes and just invoke the appropriate parser.
>
> Julian
>
>
> > On Jun 6, 2016, at 1:55 PM, Michael Mior <[email protected]> wrote:
> >
> > As an aside if we want a human-readable configuration format that's more
> > flexible than JSON I would personally prefer YAML. It's much more
> standard
> > than any of the JSON variants and can encode all the necessary
> structures.
> >
> > --
> > Michael Mior
> > [email protected]
> >
> > 2016-06-06 16:51 GMT-04:00 Michael Mior <[email protected]>:
> >
> >> Right now none of the examples are strictly JSON anyway. There are
> several
> >> different JSON supersets that we could potentially use. It might be
> nice to
> >> pick one so there's at least some kind of standard.
> >>
> >> https://hjson.org/
> >> https://github.com/timjansen/hanson
> >> http://json5.org/
> >>
> >> --
> >> Michael Mior
> >> [email protected]
> >>
> >> 2016-06-06 15:27 GMT-04:00 Julian Hyde <[email protected]>:
> >>
> >>> HOCON is a superset of JSON that makes it easier for humans to edit
> JSON
> >>> files. For example, it supports multi-line strings, file inclusion,
> >>> comments.
> >>>
> >>> Should Calcite support HOCON in addition to strict JSON for model files
> >>> any other config files? What should be the suffix of such files?
> >>>
> >>> https://github.com/typesafehub/config <
> >>> https://github.com/typesafehub/config>
> >>>
> >>> Julian
> >>>
> >>>
> >>
>
>

Reply via email to