We currently use { target: {}, params: {} } for single-transclusion content, and {parts: [{template:{target: {}, params: {}, i: 0}}]} for multi-part transclusions and extensions. This creates special cases and makes it necessary to know all keys to convert the single-transclusion format into the parts bit.
The missing namespacing also makes it harder than necessary to add additional information to data-mw.
To clean this up, we should consider moving to always using an array format like this:
parts: [{"@type":"mw:Transclusion", target: {}, params: {}}]
The change to always use an array is already supported by VisualEditor. Flattening the nested object and using a JSON-LDish @type key makes the parts structure more regular and easier to extend. It also moves it closer to the RDFa names. Both us and VE can support both formats as an input for a while to avoid caching issues, but should start by only emitting the new format.
See also:
http://json-ld.org/playground/index.html -- some example JSON-LD
Version: unspecified
Severity: normal