Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2010-02

YAML support

5 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Wimpie Nortje

Hi list,

Are there plans to implement YAML? I found JSON support but that is missing a feature I would like to use. Apparently JSON is a subset of YAML, but it doesn't have a direct way to capture binary data.

Michael Van Canneyt
to Wimpie Nortje
Wimpie Nortje wrote 5 lines
Hi list, Are there plans to implement YAML? I found JSON support but that is missing a feature I would like to use. Apparently JSON is a subset of YAML, but it doesn't have a direct way to capture binary data.

JSON is not related to YAML at all except in that it is a simple data format.

And as far as I can see from the specs, YAML also does not offer a direct way to capture binary data. IMHO both need to specify binary data as an array of bytes.

All that aside, I think it would be good to have an implementation that reads and produces YAML.

Michael.

Wimpie Nortje
to Michael Van Canneyt
JSON is not related to YAML at all except in that it is a simple data format.

That's true, but from the yaml v1.2 spec:
"YAML can therefore be viewed as a natural superset of JSON, offering improved human readability and a more complete information model. This is also the case in practice; every JSON file is also a valid YAML file."

And as far as I can see from the specs, YAML also does not offer a direct way to capture binary data.

That is also true. I got the impression from wikipedia that YAML has a direct way to capture the binary data. From the specs I see that YAML uses base64 coding for binary data, which was what I hoped to prevent because it causes a lot of computation overhead.

ik
to Wimpie Nortje

waaayp - We Are Anxiously Awaiting Your Patches
Defined by oliebol

http://ik.homelinux.org/

Wimpie Nortje wrote 25 lines
JSON is not related to YAML at all except in that it is a simple data format. That's true, but from the yaml v1.2 spec: "YAML can therefore be viewed as a natural superset of JSON, offering improved human readability and a more complete information model. This is also the case in practice; every JSON file is also a valid YAML file." And as far as I can see from the specs, YAML also does not offer a direct way to capture binary data. That is also true. I got the impression from wikipedia that YAML has a direct way to capture the binary data. From the specs I see that YAML uses base64 coding for binary data, which was what I hoped to prevent because it causes a lot of computation overhead. _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Michael Van Canneyt
to Wimpie Nortje: That's true, but from the yaml v1.2 spec: "YAML can therefore be viewed as a natural…
Wimpie Nortje wrote 7 lines
JSON is not related to YAML at all except in that it is a simple data format. That's true, but from the yaml v1.2 spec: "YAML can therefore be viewed as a natural superset of JSON, offering improved human readability and a more complete information model. This is also the case in practice; every JSON file is also a valid YAML file."

That's marketing speak. I find YAML totally unreadable :-)

The advantage of JSON is that a webbrowser parses it natively, and therefor is very fast. This is clearly not the case for YAML.

Show quoted text 5 lines
And as far as I can see from the specs, YAML also does not offer a direct way to capture binary data. That is also true. I got the impression from wikipedia that YAML has a direct way to capture the binary data. From the specs I see that YAML uses base64 coding for binary data, which was what I hoped to prevent because it causes a lot of computation overhead.

Since they are text formats, this is simply impossible, I fear :(

Michael.