XML versus JSON
Choose the format that fits the data and the consumers.
What you will be able to do
- JSON is simpler for APIs.
- XML handles mixed content and namespaces.
- Both need validation at boundaries.
- Do not convert formats just for fashion.
In plain English
JSON is smaller and maps directly to common language types. XML supports mixed content, namespaces, schemas and mature document tooling. Use JSON for APIs and XML for documents, feeds and legacy integrations.
JSON: {"title":"CSS","minutes":18}
XML: <lesson minutes="18"><title>CSS</title></lesson>Your turn
EasyChoose a format
You are integrating with a SOAP service. Which format must you use?
HTML · starter
format =Check your understanding before moving on.
Knowledge checkQuestion 1
Which format natively supports namespaces and mixed content?
Select an answer to continue
Study tools
Make it yours.
Keep a private note for this lesson, then turn the key ideas into flashcards you can revisit.
Sign in to save notes and flashcards.Both are private to your account and stay with your progress.
Sign inFinished reading?
Lock in what you just learned.
0%
Mark this lesson complete to save your place and move one step closer to the certificate.