Cov lus JSON yog dab tsi?
Cov lus JSON yog dab tsi?

Video: Cov lus JSON yog dab tsi?

Video: Cov lus JSON yog dab tsi?
Video: Leng Yang - Yog Vim Dab Tsi (Official Full Song | Nkauj Tawm Tshiab) 2020/05/24 2024, Kaum ib hlis
Anonim

json .org. JavaScript Object Notation ( JSON , hais tau /ˈd?e?s?n/; kuj /ˈd?e?ˌs?n/) yog ib hom ntawv qhib cov ntaub ntawv, thiab cov ntaub ntawv sib hloov hom ntawv, uas siv tib neeg-nyeem ntawv nyeem los khaws thiab xa cov ntaub ntawv cov khoom uas muaj tus cwj pwm-tus nqi khub thiab array cov ntaub ntawv hom (los yog lwm yam serializable tus nqi).

Kuj paub, JSON hom piav qhia nrog piv txwv yog dab tsi?

JSON piv txwv JSON yog hom ntaub ntawv dav dav nrog tus lej tsawg kawg ntawm hom nqi: cov hlua, tus lej, booleans, npe, khoom , thiab null. Txawm hais tias cov ntawv sau yog ib feem ntawm JavaScript, cov hom no tau sawv cev hauv txhua hom lus programming, ua JSON yog tus neeg sib tw zoo los xa cov ntaub ntawv hla cov lus sib txawv.

Ib yam li ntawd, JSON ua haujlwm li cas? JavaScript Object Notation ( JSON ) yog ib txoj hauv kev khaws cov ntaub ntawv hauv kev sib koom ua ke thiab yooj yim. Cov ntaub ntawv yuav tsum yog nyob rau hauv daim ntawv ntawm cov ntawv nyeem thaum sib pauv ntawm ib tug browser thiab ib tug neeg rau zaub mov. Koj tuaj yeem hloov txhua yam khoom siv JavaScript rau hauv JSON thiab xa JSON mus rau lub server.

Yog li ntawd, JSON yog dab tsi thiab vim li cas nws thiaj siv?

Cov JSON hom ntawv feem ntau siv rau serializing thiab xa cov ntaub ntawv tsim los ntawm kev sib txuas network. Nws yog siv Feem ntau xa cov ntaub ntawv ntawm tus neeg rau zaub mov thiab lub vev xaib thov, ua lwm txoj hauv kev rau XML.

JSON cov ntaub ntawv zoo li cas?

A JSON cov khoom yog cov ntaub ntawv tseem ceeb-tus nqi uas feem ntau ua rau hauv curly braces. Thaum koj ua haujlwm nrog JSON , koj yuav pom JSON cov khoom hauv ib. Txhua tus khub tseem ceeb-tus nqi yog sib cais los ntawm ib qho comma, yog li qhov nruab nrab ntawm a JSON zoo li qhov no: "key": "value", "key": "value", "key": "value".

Pom zoo: