Puas yog JSON muaj hom hnub?
Puas yog JSON muaj hom hnub?

Video: Puas yog JSON muaj hom hnub?

Video: Puas yog JSON muaj hom hnub?
Video: Peter - Vim koj [ Yog muaj hnub tsis muaj kuv lawm ] || ( Official music video ) 2024, Kaum ib hlis
Anonim

JSON Hnub tsis yog hnub - lawv yog Strings

Yog li txhawm rau sawv cev hnub hauv JavaScript, JSON siv ib txoj hlua tshwj xeeb - ISO 8601 - rau encode hnub raws li txoj hlua. Koj ua tau serialize rau hom ntawv no, tab sis tsis muaj qhov ncaj qha deserialization rov qab mus rau a hnub los ntawm nws.

Ib yam li ntawd, hnub tim hom ntawv hauv JSON yog dab tsi?

Lub neej ntawd hom ntawv siv los ntawm Json . NET yog tus qauv ISO 8601: "2012-03-19T07:22Z". Ua ntej Json NET 4.5 hnub tim tau sau siv Microsoft hom ntawv : "/ Hnub tim (1198908717056)/".

Ib yam li ntawd, hom twg tsis tau txais kev txhawb nqa los ntawm JSON? JSON qhov tseem ceeb tsis tuaj yeem yog ib qho ntawm cov ntaub ntawv hauv qab no hom : ib function. ib hnub.

Yam ntaub ntawv siv tau

  • ib txoj hlua.
  • ib tus lej.
  • ib yam khoom (JSON object)
  • ib array.
  • ib boolean.
  • null.

Xav txog qhov no, hom ntaub ntawv twg yog ib feem ntawm JSON tus qauv?

JSON txhawb nqa 6 hom ntaub ntawv: hlua. tus lej. boolean . null.

JSON teb yog dab tsi?

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

Pom zoo: