}"email"hide"yesyou will notice some differences firstin xmlwe can add attributes like "intlto the "phonetag in jsonwe simply have key-value pairs also the xml "persontag is gonereplaced by set of outer curly braces in generaljson structures are simpler than xml because json has fewer capabilities than xml but json has the advantage that it maps directly to some combination of dictionaries and lists and since nearly all programming languages have something equivalent to python' dictionaries and listsjson is very natural format to have two cooperating programs exchange data json is quickly becoming the format of choice for nearly all data exchange between applications because of its relative simplicity compared to xml parsing json we construct our json by nesting dictionaries and lists as needed in this examplewe represent list of users where each user is set of key-value pairs ( dictionaryso we have list of dictionaries in the following programwe use the built-in json library to parse the json and read through the data compare this closely to the equivalent xml data and code above the json has less detailso we must know in advance that we are getting list and that the list is of users and each user is set of key-value pairs the json is more succinct (an advantagebut also is less self-describing ( disadvantageimport json data ''"id" "" " ""name"chuck"id" "" " ""name"brent]''info json loads(dataprint('user count:'len(info)for item in infoprint('name'item['name']