yaml and aeson Was: Growing Haskell Platform

Oren Ben-Kiki haskell-oren at ben-kiki.org
Fri Dec 7 11:09:31 CET 2012


YAML does provide additional power over JSON when it comes to serialization
(in the form of !tags), so it seems that by using the same API you'd be
giving up some power. Of course, if you decide to stick to the JSON subset
and just use YAML for more readable syntax, the same API will work fine.

Have fun,

    Oren Ben-Kiki


On Fri, Dec 7, 2012 at 12:08 PM, Oren Ben-Kiki <oren at ben-kiki.org> wrote:

> YAML does provide additional power over JSON when it comes to
> serialization (in the form of !tags), so it seems that by using the same
> API you'd be giving up some power. Of course, if you decide to stick to the
> JSON subset and just use YAML for more readable syntax, the same API will
> work fine.
>
> Have fun,
>
>     Oren Ben-Kiki
>
>
> On Fri, Dec 7, 2012 at 12:00 PM, Roman Cheplyaka <roma at ro-che.info> wrote:
>
>> * Michael Snoyman <michael at snoyman.com> [2012-12-07 11:51:40+0200]
>> > > As for toYAML/toJSON, I guess most of the time they are different
>> anyway —
>> > > otherwise it's defeating the purpose of YAML to be more human-readable
>> > > than JSON.
>> > >
>> > >
>> > I don't think that's true in practice. Most of the readability of YAML
>> > comes from the syntax, not the choice of actual serialization structure.
>> > But I could be mistaken.
>>
>> Not the serialization structure, no.
>>
>> I meant that YAML has some flexibility in syntax, which probably should
>> be exploited by the instance writer to improve readability.
>>
>> For that you'd need a sufficiently adjustable pretty-printer, but that
>> also means that you can't reuse ToJSON.
>>
>> Roman
>>
>> _______________________________________________
>> Libraries mailing list
>> Libraries at haskell.org
>> http://www.haskell.org/mailman/listinfo/libraries
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/libraries/attachments/20121207/f7d1718d/attachment.htm>


More information about the Libraries mailing list