Assignment 2 Angular uses JSON extensively to interact with back-end Web Service, to store data in the HTML 5 Local Storage, and to configure the Angular application it's self JSON - JavaScript Object Notation is a Internet standard for data exchange, it is simpler and more compact than XML, but does not offer the encryption or digital signature options of XML. JSON is the most common data exchange format for REST Style Web Services and we will be using it in the class. Node uses JSON for most of it's configuration and data exchange formats. Open a Browser to: http://api.worldbank.org/v2/countries/BR?format=json You will see the World Bank information about the country of Brazil Here is the formatted data: [ { "page":1, "pages":1, "per_page":"50", "total":1 }, [ { "id":"BRA", "iso2Code":"BR", "name":"Brazil", "region":{ "id":"LCN", "iso2code":"ZJ", "value":"Latin America & Caribbean " }, "adminregion":{ "id":"LAC", "iso2code":"XJ", "value":"Latin America & Caribbean (excluding high income)"}, "incomeLevel":{ "id":"UMC", "iso2code":"XT", "value":"Upper middle income" }, "lendingType":{ "id":"IBD", "iso2code":"XF", "value":"IBRD" }, "capitalCity":"Brasilia", "longitude":"-47.9292", "latitude":"-15.7801" } ] ] JSON Syntax Rules: JSON like JavaScript is case sensitive. A JSON file is typically named with a .json suffix. JSON allows whitespace (space, linefeed, carriage return, tab) between elements for readability. See: https://www.json.org/json-en.html for the complete JSON syntax. JSON objects are delimited by a set of { }. in the World Back example above, lendingType is a JSON Object "lendingType":{ "id":"IBD", "iso2code":"XF", "value":"IBRD" }, this object has 3 fields: id, iso2code, and value An array in JSON is indicated by [ ] in the World Back example above, the root element is and Array of 2 items, the first item is an anonymous object with the page data, the second object and another array containing 2 items, the first item in the inner-array is an anonymous object with the country data, the second item in the inner-array is adminregion A field in JSON is simple a name followed by a colon ‘:’ and then the contents of that field. Field contents (also called value) may be: string <= double quotes are used number <= may contain an E/e for exponent array <= [ ] are used object <= { } are used true false null ================================================================================== Working with JSON Objects Open a Browser to: https://jsoneditoronline.org/ and create the following JSON data: A root object to hold your data Within the root object add a field called “name” which will contain another JSON object Add the following fields within the “name” object: First Name Last Name Within the root object add a field named “address” which will contain another JSON object Add the following fields within the “address” object: Street City State Postal Code Within the root object add a field to hold an array of phone numbers Add the following numbers: Home Cell Work Within the root object add a field to hold your age age