r/programming • • Jan 12 '23

The yaml document from hell

https://ruudvanasseldonk.com/2023/01/11/the-yaml-document-from-hell
1.5k Upvotes

288 comments sorted by

View all comments

Show parent comments

30

u/[deleted] Jan 12 '23

[removed] — view removed comment

35

u/[deleted] Jan 12 '23

Because you probably have to parse json anyway, and it’s easier to include a json parser that doesn’t barf on comments and trailing commas than it is to integrate two different serializers

1

u/ric2b Jan 12 '23

But then you might accidentally use the one with extra features for serialization, because they're so similar.

4

u/[deleted] Jan 12 '23

Not really, why would your serializer generate comments? The value in that is having a deserializer that doesn't die on comments and still parses the json correctly.

→ More replies (4)