XML is defined by the World Wide Web Consortium's (W3C') XML 1.0 Specification. It was designed to be general, allowing it to be used in a wide range of applications. It is a balanced version of Hypertext Markup Language (HTML) and there is the Extensible Hypertext Markup Language (XHTML) definition.
JSON is a simpler encoding method that retains the flexible entry format of XML. Two standards address JSON at this point, RFC 7159 and ECMA-404. RFC 7159 addresses some security and semantic issues whereas ECMA is primarily a syntax definition.
JSON uses name/value pairs. It also has a number of basic data types including numbers, strings, booleans, and null.