About JSON data conversion issues

Operations on the data needs to be processed in the background operation, acquires the transmission request reception JSON format is required,

Backstage pass over the JSON format is usually a string format, if the background do not need to use the process JSON.parse () method to handle it, into JavaScript objects for the job

If the transmission request via ajax foreground to the background, the background need to string format, you need the JSON.stringify () into a string format

Note: If you want the data localStorage local storage also need to be JSON.stringify () into a string format

Guess you like

Origin www.cnblogs.com/wenyilian/p/11518991.html