A JSON Stands for Java Script Object Notation

Added on - Sep 2019

Trusted by 2+ million users,
1000+ happy students everyday
Showing pages 1 to 1 of 3 pages
JSON Handleryou are tasked with creating a JSON handler. A JSON stands for JavaScript Object Notation (See: JSONDescription). A JSON is a lightweight data-interchange formatted as a string that can be parsed back intothe object it represents. Your JSON handler will be a custom data structure that will reconstitute theJSON encoded objects in your data-structure objects. Your data structure must:1.Add new object2.Get an object3.Sort sortable objects4.Search for a specific value (binary for sortable/linear for un-sortable)5.Remove a specific object6.Export an object as a JSONYour data structure:Must parse JSON StringsMust implement at least one java data structure interfaceMust handle serializable object (to serialize and de-serialize objects)Must be able to determine an object if an object implements ComparableMust be able to determine an object’s classObjects in ObjectsA JSON object may have multiple name-value pairs in it (see: JSON Description). The value in a name-value pair can be one or more name-value pairs:{ name : { name : value , name : value } }For example, imagine that rows from a database are downloaded as JSON objects. Each row would havethe same basic format. Each “name” would be a column and each “value” would be the data in that rowfor that column and the main identifier would be the primary key identifying the row.{ primary key : { “fname” : “fred” , “lname” : “jones” , “age” : “35” , “address” : “123 Main st” }In this example, there is an object whose “name” is the primary key of a database table and its value is aseparate data structure of four other name-value objects. You might imagine the entire data base tableis a giant data structure of all the “row objects” in the table.
Desklib Logo
You are reading a preview
Upload your documents to download or

Become a Desklib member to get access