Currently we are using a mix of JSON and post parameters in the section transform API. An example request would send a mix of form data and JSON like this:
sections: '{"mwAg":"<h2>First Section replaced</h2><h2>Appended Section</h2>"}'
This is a messy approach for validation and processing.
I think we should instead move to a JSON focused spec, using a JSON schema to describe the request body. We could still support POST-based requests using the mapping schema described in T111748.
The upside of moving to a JSON spec is the avoidance of special cases, and clean validation support. The downside is the loss of per-key forms in the documentation, although arguably a single JSON form field might actually be less confusing than the current mix of plain-string and JSON form fields.