Please focus on the technical aspect of this question, and not on the why. The why is obvious: YAML is the most human-readable data serialization format available to man. And therefore, the best.
How can I send YAML via an XMLHttpRequest from the client to the server, without first converting it to JSON, XML or another format?
I am using JavaScript for the client-side code, I can use jQuery if needed. My server-side language of choice is PHP.
According to Wikipedia, the send()
method of XMLHttpRequest:
Accepts a single parameter containing the content to be sent with the request. The W3C draft states that this parameter may be any type available to the scripting language as long as it can be turned into a text string, with the exception of the DOM document object. [Emphasis my own]
YAML is a text string. Can it be sent and subsequently parsed correctly on the server-side without using another data serialization format like json, xml etc?