code: def test_show_json(split, mocker, capsys):
      import dvc.commands.plots
  
      renderer = mocker.MagicMock()
      renderer_obj = RendererWithErrors(renderer, {}, {})
      renderer.name = "rname"
      to_json_mock = mocker.patch(
          "dvc.render.convert.to_json",
          return_value={"renderer": "json"},
      )
  
      dvc.commands.plots._show_json([renderer_obj], split)
  
      to_json_mock.assert_called_once_with(renderer, split)
  
      out, _ = capsys.readouterr()
      assert json.dumps({"rname": {"renderer": "json"}}) in out
  
imports: import json
  import os
  import posixpath
  from pathlib import Path
  import pytest
  from funcy import set_in
  from dvc.cli import parse_args
  from dvc.commands.plots import CmdPlotsDiff, CmdPlotsShow, CmdPlotsTemplates
  from dvc.render.match import RendererWithErrors
  from dvc.utils.serialize import YAMLFileCorruptedError
label_desc: Use image node_id 13 for calling a global function with example usage: test_show_json(split, mocker, capsys) without return types