JavaScript JSON mode
CodeMirror JavaScript mode supports additional configuration options, allowing to display json, json-ld and typescript (doc)
I need the JSON mode, not sure how this could be configured right now.
CodeMirror supports using mime types as mode values, and then it automatically maps to correct mode, setting application/json is internally replaced with json: true, mode: javascript but setting mime type in the plugin config does not works correctly as it tries to load a js file mode/application/json.js that actually is not there.
This could be fixed by using the same mode resolving logic that CodeMirror has - https://github.com/codemirror/codemirror5/blob/e84384b4210bc35300994de07c6333666f2a5c9e/src/modes.js#L20C1-L20C1 and https://github.com/codemirror/codemirror5/blob/e84384b4210bc35300994de07c6333666f2a5c9e/mode/javascript/javascript.js#L953