Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

JSON vs XML

//JSON Example
{"employees":[
  { "firstName":"John", "lastName":"Doe" },
  { "firstName":"Anna", "lastName":"Smith" },
  { "firstName":"Peter", "lastName":"Jones" }
]}

//XML Example
<employees>
  <employee>
    <firstName>John</firstName> <lastName>Doe</lastName>
  </employee>
  <employee>
    <firstName>Anna</firstName> <lastName>Smith</lastName>
  </employee>
  <employee>
    <firstName>Peter</firstName> <lastName>Jones</lastName>
  </employee>
</employees>
Comment

xml vs json

These are 2 common formats that we use when exchanging data across the web: 

-- eXtensible Markup Language (XML) has been in use for a very long time and is 
best suited for exchanging document-style data
-- when programs just want to exchange dictionaries, lists, or other internal 
information with each other, they use JavaScript Object Notation (JSON)
Comment

xml or json

POST /download 
Host: user-agents.net 

browser=samsung-browser&version=16-0&browser_type=browser&download=json
Comment

PREVIOUS NEXT
Code Example
Javascript :: flatlist inside flatlist react native 
Javascript :: call a function 
Javascript :: chrome extension catch shortcut 
Javascript :: node http2 post 
Javascript :: MaterialRippleLayout dependency 
Javascript :: js get children last 
Javascript :: Expresion regular para validar Dirección URL 
Javascript :: javascript get cookie value one liner 
Javascript :: express proxy 
Javascript :: use cors 
Javascript :: firebase get key value 
Javascript :: for of and for in javascript 
Javascript :: dropdowndirection 
Javascript :: generate svg from javascript 
Javascript :: Javascript Unordered List HTML form Array 
Javascript :: let a = {y;10}; 
Javascript :: angular form validation whitespace 
Javascript :: change cover photo with javascript 
Javascript :: how to find reverse of a number in javascript 
Javascript :: js insert a point each three digit 
Javascript :: expo av 
Javascript :: javascript get all elements of an id 
Javascript :: js nepali phone number validation regex 
Javascript :: option component in react js errors 
Javascript :: reverse array in javascript 
Javascript :: Recorrer Array con forEach 
Javascript :: comparare due array di numeri javascript 
Javascript :: javascript div hover alert 
Javascript :: react native uid 
Javascript :: × Error: Invariant failed: You should not use <Switch outside a <Router 
ADD CONTENT
Topic
Content
Source link
Name
5+7 =