Skip to content

Commit 9a7f861

Browse files
committed
Both: General/Uncategorized (Edited Q&A)
1 parent 51531e8 commit 9a7f861

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

README.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Use the Table of Contents to practice and test your knowledge. It doesn't show t
2626
- What is a protocol? How do you define your own protocol?
2727
- What is waterfall methodology and Agile methodology? What are the differences between them?
2828
- What is the difference between a class and an object?
29-
- What is JSON?
29+
- What is JSON? What are the pros and cons?
3030
- What is the difference between not-running, inactive, active, background and suspended execution states?
3131
- Is it faster to iterate through an NSArray or an NSSet?
3232
- What is KVO?
@@ -160,10 +160,21 @@ List of differences:
160160

161161
In the simplest sense, a class is a blueprint for an object. It describes the properties and behaviors common to any particular type of object. An object, on the other hand, is an instance of a class.
162162

163-
#### What is JSON?
163+
#### What is JSON? What are the pros and cons?
164164

165165
JSON stands for JavaScript Object Notation. According to [wiki](https://en.wikipedia.org/wiki/JSON), it is a file format that uses human-readable text to transmite data objects consisting of attribute-value pairs and array data types.
166166

167+
Pros:
168+
169+
- It is lighter than XML meaning that it can represent the same data in XML in fewer bytes. This makes network transmissions and read/writes faster
170+
- Since it is native to JavaScript, computationally-expensive XSL tranformations are not needed in order to extract data
171+
172+
Cons:
173+
174+
- Not as widespread as XML
175+
- Data is not readily streamable and has to be broken up into individual objects
176+
- Can't use comments
177+
167178
#### What is the difference between not-running, inactive, active, background and suspended execution states?**
168179

169180
- Not-running occurs when the app either has not be launched or was running but was terminated by the system.

0 commit comments

Comments
 (0)