JSON is the internal serialization format.
You're suggesting to use MediaWiki as a model :)
What's stopping you from implementing it as a _file_ handler, not
_article_ handler?
I mean, _articles_ contain text (now wikitext).
All non-human readable/editable/diffable data is stored as "files".
Now they all are in File namespace, but maybe it's much more simpler to
allow storing them in other namespaces and write file handlers for
displaying/editing them than to break the idea of "article"?