According to the needs of the project, I want to define a JSON string. Given the fact that the previous null foundation is found, I saw the following link to the encyclopedia explanation
/link?url=TUxeHruHcaY-hofuOufrP37a8VhUT8hcFM4k7JkTN1500wAlfwihAoRRg12g5klTT-l050TjCGA__EM1zfJ9bq&qq-pf-to=pcqq.c2c. There is one sentence that says: To implement conversion from an object to a JSON string, use the () method:
var json = ({a: 'Hello', b: 'World'}); //turn out '{"a": "Hello", "b": "World"}'
By definition I defined my own data as the same format. But the problem is that when I use this data, I need to process it and use $() to implement routing jump.
$The usage method is as follows:// String ('home')// Object ({ path:'home' })// Named route({ name:'user', params: { userId: 123 }})// With query parameters, become /register?plan=({ path:'register', query: { plan: 'private' }})
After this format is changed, the router cannot be responsive.
The deepest feeling is that when data is transformed, you must consider comprehensively, deeply understand what each definition means, and then take the best one to facilitate the use of data.
The above is the questions I have introduced to you that you should pay attention to when processing data using JSON format. I hope it will be helpful to you. If you have any questions, please leave me a message. The editor will reply you in time. Thank you very much for your support for my website!