When I have an html input field like this:
<input name="user[name]" value="peter">
<input name="user[emails][]" value="[email protected]">
<input name="user[emails][]" value="[email protected]">
It gets deserialized in a Ruby on Rails app to a hash like this:
{ "user" => { "name" => "peter", "emails" => ["[email protected]", "[email protected]"] } }
A PHP application (and possibly many more frameworks) will deserialize this in a similar way. I understand the process is also called demarshalling.
The browser will send this data in the application/x-www-form-urlencoded encoding, but that is not the level at which I want to understand this format, it seems more like a convention to indicate to the server how the data transmitted by the browser is to be parsed.
Here is my question:
What is the name of this serialization / marshalling format? Is it specified anywhere?
Edit:
I did a little digging. In rubyland this is handled by the parse_nested_query method of the Rack::QueryParser
in the rack stack.