Is YAML undesirable for presenting REST documents exchanged between services? If so, why?

XML and JSON are popular, but I wonder why YAML doesn't seem to be used as a way to represent documents returned by services in SOA.

YAML documents seem to have the advantage of being easy to compose by hand - simpler than JSON or XML, and then just sending it with a simple tool like curl .

+4
source share
1 answer

I don’t think there is anything special against YAML. Just so JSON is good enough. Its simple, deployed everywhere, it has many tools, wraps it in a callback, and you get cross-domain requests. And it’s not very difficult to write by hand. Any format that wants to compete with JSON must overcome its network effects, which is not a trivial task.

XML is basically just out of date, again prone to network effects.

+2
source

Source: https://habr.com/ru/post/1395415/


All Articles