What exactly is the point of this when you could have pure JSON as a hidden form value without any of the "hacks" or worries about content type...
{
"key1": "val1",
"params": {
"input": "value",
"list": []
},
"dummy": "="
}
If the JSON is just a hidden form value as you suggest, the request as a whole will not be treated as JSON data. Then invalid characters will (usually) be added to the request body by the browser, and the server will (probably) be unable to parse it, causing the request to fail. This is due to how forms are encoded for POST requests.On the other hand, if you're wondering why anyone would ever do this, then I do not have a good answer for you :)