This is not a direct answer to your question but if you have the option, I would restructure the shortcode so that it takes one or more attributes that you then plug in to the correct JSON format. e.g.:
[myshortcode zoom="5"]
This would not only prevent your site editors from making syntax mistakes (or at least they’d make different ones!) but would probably be a little more structured and secure. For instance, your zoom
shortcode attribute could make sure that only numeric values are allowed and could set a sensible default for those that don’t set the att with their shortcode:
// [myshortcode zoom={integer}]
function myshortcode_func( $atts ) {
$atts = shortcode_atts( array(
// defaults
'zoom' => 5,
// etc...
), $atts );
// sanitize!
$atts['zoom'] = intval( $atts['zoom'] );
// do lots of fancy JSON things
}
add_shortcode( 'myshortcode', 'myshortcode_func' );