Skip to content

NSJSONSerialization JSONObjectWithData: implementation #54

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 42 commits into from
Dec 9, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
102c3cf
Add tests for JSON byte-encoding detection
argon Dec 6, 2015
f65ec31
Introduce the skeleton of a deserializer
argon Dec 6, 2015
7b51a99
Add [String:String] support to deserialization
argon Dec 6, 2015
a57e058
Add multi-member support to objects
argon Dec 6, 2015
0322b5e
Throw for unterminated strings
argon Dec 6, 2015
9ff6866
Throw MissingObjectKey error
argon Dec 6, 2015
44a8f81
Throw UnexpectedEndOfFile error
argon Dec 6, 2015
6da3726
Make parse/read naming more consistent
argon Dec 6, 2015
177dc3d
Add parsing of empty arrays
argon Dec 6, 2015
70ba6e3
Actually detect the encoding first
argon Dec 6, 2015
44432d0
Add a missing test for string arrays
argon Dec 6, 2015
e8ca717
Add multi-element support to arrays
argon Dec 6, 2015
d10b590
Restructure the test cases
argon Dec 6, 2015
2df4c4d
Test for invalid value in arrays and objects
argon Dec 6, 2015
cebae45
Add Boolean value parsing
argon Dec 6, 2015
fd57857
Add `null` parsing
argon Dec 6, 2015
b19288e
Add Nested Object support
argon Dec 6, 2015
fb5fb14
Add Nested Array support
argon Dec 6, 2015
3907d89
Repair NSNumber behaviour
argon Dec 6, 2015
e8a38b2
Test Floating point behaviour of NSNumber
argon Dec 6, 2015
43b64e3
Remove trailing whitespace
argon Dec 6, 2015
9066bd1
Enable parsing of numbers
argon Dec 6, 2015
a395799
Throw BadlyFormedArray error
argon Dec 6, 2015
4359481
Flatten the tests
argon Dec 6, 2015
ec81519
Test the result of the encoding detection
argon Dec 6, 2015
a5ae9ac
Detect escaped quotes in strings
argon Dec 6, 2015
ee3ec9f
Decode other simple escapes
argon Dec 6, 2015
ac133b3
Throw an InvalidEscapeSequence error
argon Dec 6, 2015
61d57ea
Remove the explicit cast to NSNumber
argon Dec 6, 2015
0cbfccd
Perform a small amount of refactoring
argon Dec 6, 2015
daa3cee
Decode Unicode escape sequences
argon Dec 6, 2015
efc35d7
Rename the escape sequence tests
argon Dec 6, 2015
ae63f5b
Typealias for brevity
argon Dec 6, 2015
ae080f1
Add Unicode surrogate pair parsing
argon Dec 6, 2015
7302556
Test Missing Trailing Surrogate error
argon Dec 6, 2015
bfc2468
Merge branch 'master' into feature/NSJSONSerialization-deserialization
argon Dec 6, 2015
000cd70
Flatten numberScalars
argon Dec 7, 2015
9b69452
Flatten whitespaceScalars
argon Dec 7, 2015
1d6439f
Throw InvalidValue when invalid separator is found
argon Dec 7, 2015
4c642ef
Improve the formatting
argon Dec 8, 2015
fda6111
Merge branch 'master' into feature/NSJSONSerialization-deserialization
argon Dec 8, 2015
e819ec4
Make the types consistent for new Runtime
argon Dec 8, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Foundation.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@
EADE0BCB1BD15E0000C49C64 /* NSXMLNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = EADE0B8D1BD15DFF00C49C64 /* NSXMLNode.swift */; };
EADE0BCC1BD15E0000C49C64 /* NSXMLNodeOptions.swift in Sources */ = {isa = PBXBuildFile; fileRef = EADE0B8E1BD15DFF00C49C64 /* NSXMLNodeOptions.swift */; };
EADE0BCD1BD15E0000C49C64 /* NSXMLParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = EADE0B8F1BD15DFF00C49C64 /* NSXMLParser.swift */; };
ED58F76F1C134B3A00E6A5BE /* TestNSJSONSerialization.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED58F76E1C134B3A00E6A5BE /* TestNSJSONSerialization.swift */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -612,6 +613,7 @@
EADE0B8D1BD15DFF00C49C64 /* NSXMLNode.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NSXMLNode.swift; sourceTree = "<group>"; };
EADE0B8E1BD15DFF00C49C64 /* NSXMLNodeOptions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NSXMLNodeOptions.swift; sourceTree = "<group>"; };
EADE0B8F1BD15DFF00C49C64 /* NSXMLParser.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NSXMLParser.swift; sourceTree = "<group>"; };
ED58F76E1C134B3A00E6A5BE /* TestNSJSONSerialization.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TestNSJSONSerialization.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -1031,6 +1033,7 @@
DCDBB8321C1768AC00313299 /* TestNSData.swift */,
84BA558D1C16F90900F48C54 /* TestNSTimeZone.swift */,
844DC3321C17584F005611F9 /* TestNSScanner.swift */,
ED58F76E1C134B3A00E6A5BE /* TestNSJSONSerialization.swift */,
);
name = Tests;
sourceTree = "<group>";
Expand Down Expand Up @@ -1731,6 +1734,7 @@
EA66F6561BF1619600136161 /* TestNSString.swift in Sources */,
5B40F9F21C125187000E72E3 /* TestNSXMLParser.swift in Sources */,
EA66F64C1BF1619600136161 /* TestNSDictionary.swift in Sources */,
ED58F76F1C134B3A00E6A5BE /* TestNSJSONSerialization.swift in Sources */,
EA66F6581BF1619600136161 /* TestNSURL.swift in Sources */,
EA66F6441BF1619600136161 /* main.swift in Sources */,
);
Expand Down
Loading