JSON parsing is quite a bit of work in development. For example, if we don’t pull the data from the interface, we can bring the data to the row ourselves. This is where JSON comes in. We Stringfy the data and pass it through and parse it to get the data. Json. parse fails if some special characters are encountered during parsing.

1 Data is retrieved from the interface so there is no need to transfer

2. Encode, decode and parse

  • encodeURIComponent(encodeURIComponent(JSON.stringify(obj)))
  • JSON.parse(decodeURIComponent(options.clickItem))

Json.parse can be resolved in the following two steps