Json - json PDF

Title Json - json
Author Sanjay Kumar
Course JavaScript Object Notation
Institution Ranchi University
Pages 3
File Size 39.9 KB
File Type PDF
Total Downloads 57
Total Views 152

Summary

json...


Description

1) Mention what is JSON? JSONi sasi mpl edat aex changef or mat .JSONmeansJ av aScr i ptObj ectNot at i on;i ti s l anguageandpl at f or mi ndependent . 2) Explain what is JSON objects? Anobj ectcanbedefinedasanunor der eds etofname/ v al uepai r s .Anobj ecti nJ SON s t ar t swi t h{ l ef tbr ac e}andfini shorendswi t h{ r i ghtbr ace} .Ev er ynamei sf ol l owedby : ( col on)andt hename/ val uepai r sar epar t edby ,( comma) . 3) Explain how to transform JSON text to a JavaScript object? Oneoft hecommonus eofJSONi st oc ol l ectJSONdat af r om awebs er v erasafil eor HTTPr equest ,andconv er tt heJSONdat at oaJav aScr i pt ,antt heni tav ai l st hedat ai na webpage. 4) Mention what is the rule for JSON syntax rules? Give an example of JSON object? JSONs y nt axi sasetoft heJav aScr i ptobj ec tnot at i ons y nt ax .  Dat ai si nname/ v al uepai r s  Dat ai ssepar at edbycomma  Cur l ybr ack et shol dobj ect s  Squar ebr ack ethol dsar r ay s 5) Why must one use JSON over XML?  I ti sf ast erandl i ght ert hanXMLasont hewi r edat af or mat  XMLdat ai st y pel esswhi l eJSONobj ect sar et y ped  JSONt ypes :Number ,Ar r ay ,Bool ean,St r i ng  XMLdat aar eal l st r i ng  Dat ai sr eadi l yav ai l abl easJSONobj ecti si ny ourJav aScr i pt  Fet chi ngv al uesi sass i mpl easr eadi ngf r om anobj ectpr oper t yi ny ourJav aScr i pt code 6) Mention what is JSON-RPC and JSON Parser?  JSON RPC: I ti sasi mpl er emot epr ocedur ecal l pr ot ocol sameasXML RPC al t houghi tusest hel i ght wei ghtJSONf or mati nst eadofXML  JSON Parser: J SONpar seri susedt opar set heJSONdat ai nt oobj ect st ousei t s v al ue.I tcanbepar s edbyj av aScr i pt ,PHPandj Quer y 7) Mention what is the file extension of JSON? Fi l eext ens i onofJSONi s. j son 8) Mention which function is used to convert a JSON text into an object? Toconv er tJ SONt exti nt oanobj ect“ eval ”f unct i oni sused. 9) Mention what are the data types supported by JSON?

Dat at y pessuppor t edbyJ SONi ncl udes  Number  St r i ng  Bool ean  Ar r ay  Obj ect  Nul l 10) Mention what is the role of JSON.stringify? JSON. s t r i ngi f y( )conv er t sanobj ecti nt oaJ SONt extandsav est hatJ SONt ex ti nast r i ng. 11) Show how to parse JSON in JQuery? Topar seJSONi nJQuer y ,wewi l l seet heex ampl e v arj s on=‘ { “ name” :“ Gur u99” ,“ Des cr i pt i on“ :“ Lear nPHPI nt er act i v el ywi t hPHPBegi nner Tut or i al s} obj =$. par seJSON( j s on) ; / / al er t ( obj . name) ; 12) Mention what is the function used for encoding JSON in PHP? Forencodi ngJ SONi nPHP,j son_enc ode( )f unct i oni sused.Thi sf unct i onr et ur nst he JSONr epr esent at i onofav al ueons ucc essorf al s eonf ai l ur e. 13) Explain how you can convert a string into a JSON Array? Toconv er tast r i ngi nt oaJ SONar r ay ,y ouneedt ocr eat eaJ SONObj ectobj ectf oreac hof y ourobj ect s,andaddt hos et oy ourJSONar r ay . 14) Mention what are the JSON files?  JSONfi l et ypef orJSONfil esi s“ . j son”  TheMI MEt y pef orJSONt ex ti s“ appl i cat i on/ j son” 15) List out the uses of JSON? UsesofJSONi ncl udes  Whenwr i t i ngappl i c at i onbasedonJav aScr i pti tusesJSON,whi chi ncl udesbr ows er ext ens i onandwebsi t es  JSONi susedf ort r ansmi t t i ngands er i al i z i ngst r uct ur eddat aov ernet wor k connect i on  JSONi smai nl yusedt ot r ans f erdat abet weenser v erandwebappl i cat i on  Webser vi ceandAPI ’ suseJSONf or matt opr ovi depubl i cdat a  JSONcanbeusedwi t hmoder npr ogr ammi ngl anguage 16) Mention what are the drawbacks of JSON? Dr awbac ksofj s onar e

 I tdoesnotcont ai nt y pedefini t i on  I tl ackss omesor tofDTD 17) Mention what is the MIME type of JSON? MI MEt ypef orJ SONt ex ti s“ appl i cat i on/ j son” 18) Mention what is JSONP? JSONPs t andsf orJSONwi t hpaddi ng.I ti samet hodusedt obypas st hecr os sdomai n pol i ci esi nwebbr owser s.I not herwor ds,JSONPi st hes i mpl ewayt odealwi t hbr ows er r est r i ct i onswhensendi ngJSONr esponsesf r om di ffer entdomai nsf r om t hec l i ent . 19) Mention what is the difference between JSON and JSONP?  JSON: J SONi sasi mpl edat af or matusedf orcommuni cat i onmedi um bet ween di ffer ents y st ems  JSONP: I ti samet hodol ogyf orusi ngt hatf or matwi t hcr os sdomai naj axr eques t s whi l enotbei ngaffect edbysameor i gi npol i cyi ssue....


Similar Free PDFs
Json - json
  • 3 Pages