Similarly as I asked here https://mediawiki.org/wiki/Topic:Wv90hlknkozvezcb
initially having issues with getting anything to work, but now having identified a working solution that I am mostly satisfied with (almost), I still am curious to further understand if it is possible to configure JsonConfig in LocalSettings.php with a rule to use the native 'json' content type as referenced in includes/DefaultSettings.php:
// simple implementation, for use by extensions, etc. CONTENT_MODEL_JSON => JsonContentHandler::class,
rather than creating a duplicated redundant class that does practically the exact same thing.
but also, that results in errors when attempting to edit pages that (in MySQL database:, pages table, page_content_model column, the value is 'json' even though my current JsonConfig configuration is using a duplicated custom named 'Json.JsonConfig'
Content format not supported The content format application/json+pretty is not supported by the content model wikitext.
Is there a way to configure to use the existing 'json' content model type?
For reference, here is my current LocalSettings.php configuration:
$wgJsonConfigModels['Json.JsonConfig'] = null; $wgJsonConfigs['JSON.JsonConfig'] = [ 'cacheExp' => 86400, 'cacheKey' => '', 'flaggedRevs' => false, 'isLocal' => true, 'license' => 'CC0-1.0', 'model' => 'Json.JsonConfig', 'namespace' => 486, 'nsName' => 'Data', 'nsTalk' => 'Data_talk', 'pattern' => '/.\.json$/', //'pattern' => '/^Json:./', 'store' => true ];