Hello,
Mutations work a bit differently in JSON. In XML, extra block data is serialized into the <mutation> elements like you showed above. In JSON, this data is saved as part of the extraState property on the block data:
{
"type": "controls_if",
"extraState": {
"hasElse": true
}
}
What the property is called depends on the block definition. This will be controlled by the `saveExtraState` and `loadExtraState` methods of the block definition. For learning how the built-in blocks work, you can also try using the
advanced playground. You can drag blocks out into the workspace and then switch between the XML and JSON tabs to compare.
I hope that helps! Best,
Maribeth