当前位置:网站首页>JS foundation -- JSON
JS foundation -- JSON
2022-07-25 02:48:00 【H5_ ljy】
List of articles
One 、JSON What is it? ?
JSON Is a string , A string format often used to transmit data over the network
Two 、JSON Grammatical rules
The data is the name / It's worth it
Data is separated by commas
Curly braces hold objects
Square brackets hold arrays
querystring Query string "name=karen&pwd=abc123&count=20" template Template string `<div style="">666</div>` JSON json character string '{"name":"karen","its":["hello","h5"]}'
3、 ... and 、JSON Methods
1. Use JSON.parse() To convert this string to JavaScript object .
2. Use JSON.stringify() Convert it to a string .
var re='{"name":"karen","it":["hello","h5",{"age":20}]}'
var obj={name:'ljy',age:22}
var re1=JSON.parse(re)
var obj1=JSON.stringify(obj)
console.log(re1,obj1)

边栏推荐
- Jenkins configuration plug-in interface displays "suggestions collection" in Chinese
- C: wechat chat software instance (wpf+websocket+webapi+entityframework)
- Insertion of balanced binary tree (AVL tree)
- Get to know string thoroughly
- Threat report in June: new bank malware malibot poses a threat to mobile banking users
- QT realizes calendar beautification
- "Introduction to interface testing" punch in day06: interface testing platform: are tools and frameworks incompatible?
- Jenkins plug-in development -- plug-in expansion
- Cookies and sessions
- B2B e-commerce trading platform of heavy metal industry: breaking the state of data isolation and improving the benefits of heavy metal industry
猜你喜欢

A bit of knowledge - websites about scripts

Genesis, the world's first "consumption investment" public chain, was invited to participate in consensus 2022

These 11 chrome artifacts are extremely cool to use

Mgre.hdlc.ppp.chap.nat comprehensive experiment

Ctfshow misc introduction

ByteDance confirmation will be self-developed chip: for internal use only; Musk: I have uploaded my brain to the cloud; Go language product head leaves | geek headline

Wechat sports field reservation of the finished works of the applet graduation project (7) mid-term inspection report

String class

Simulation Implementation of string function (Part 1)

Rolling division, Young's matrix and three-step flip
随机推荐
"Introduction to interface testing" punch in to learn day05: how can a testing framework support restful interfaces?
Explanation of C language file operation function
Picgo configuring Alibaba cloud OSS
MySQL common function summary, very practical, often encountered in interviews
Master jedispoolconfig parameter configuration and learn tuning skills
ICO objects in classification
Can PostgreSQL CDC only connect to the main database? Connection from the library reports an error logical decoden
Go multiplexing
Generator set work arrangement problem code
Codeforces:d1. choosing carrots (easy version) [max min problem + control one side to make the other side as close as possible + thinking]
C: wechat chat software instance (wpf+websocket+webapi+entityframework)
These 11 chrome artifacts are extremely cool to use
Text reading end judgment
On Calc optimization of calcite
Selenium framework operation steelth.min.js file hides browser fingerprint features
Custom types in C language
Redux best practices "Redux toolkit"
Three ways to solve your performance management problems
Flink's study notes
If there is a segment in the encryption field, are you "bronze" or "King"?