JSON vs XML
Learn JSON vs XML (Content Negotiation, Spring MVC) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.
Fresher Notes JSON (JavaScript Object Notation) is a light text format of objects, arrays, strings, numbers and booleans. XML is a tag-based format with attributes, namespaces and schemas. Spring support : JSON through Jackson ( MappingJackson2HttpMessageConverter ), XML through jackson-dataformat-xml or JAXB. Default choice : JSON for web and mobile APIs because it is shorter and maps easily to objects; XML where partners or standards (SOAP, SAML, some banking APIs) require it.