I tried using the EditorSelection fromJson method, but it didn't work.

hello,I have a scenario where I need to select the corresponding JSON fragment, like this example:
photo

Below is my code, but it didn’t work and instead gave an error

  const obj = {
    elements: [
      {
        tag: 'div',
        text: {
          content: '这是一段hjjjjjj普通文本',
          tag: 'plain_text'
        }
      },
      {
        tag: 'div',
        text: {
          content: '这是一段hjjjjjj普通文本',
          tag: 'plain_text'
        }
      }
    ]
  }

const code = shallowRef(JSON.stringify(obj, null, 2))
const view = shallowRef()
const state = shallowRef()

const handleReady = (payload) => {
    view.value = payload.view
    state.value = payload.state
    const target = {
      text: {
        content: '这是一段hjjjjjj普通文本',
        tag: 'plain_text'
      }
    }
    const json = JSON.parse(JSON.parse(JSON.stringify(target)))
    EditorSelection.fromJSON(json)
  }

<codemirror
    class="codemirror"
    :autofocus="config.autofocus"
    :placeholder="config.placeholder"
    :indentWithTab="config.indentWithTab"
    :tabSize="config.tabSize"
    :disabled="config.disabled"
    :style="{ backgroundColor: config.backgroundColor }"
    :extensions="extensions"
     v-model="code"
     @ready="handleReady"
  />

and the error:
img

That is definitely not what EditorSelection.fromJSON does. It takes a serialized representation of a selection (via EditorSelection.toJSON), and deserializes that. It doesn’t take a random bit of JSON, find that in the document, and select it.