diff --git a/api/4.0/Classes/SBJsonChunkParser.html b/api/4.0/Classes/SBJsonChunkParser.html
index d3d7ef2c..b63dee80 100644
--- a/api/4.0/Classes/SBJsonChunkParser.html
+++ b/api/4.0/Classes/SBJsonChunkParser.html
@@ -180,8 +180,7 @@
Overview
SBJsonChunkParser *parser = [[SBJsonChunkParser alloc] initWithBlock:^(id v) {
NSLog(@"Found: %@", @([v isKindOfClass:[NSArray class]]));
- }
- errorHandler: ^(NSError* err) {
+ } errorHandler: ^(NSError* err) {
NSLog(@"OOPS: %@", err);
}];
@@ -208,8 +207,7 @@ Overview
SBJsonChunkParser *parser = [[SBJsonChunkParser alloc] initWithBlock:^(id v) {
NSLog(@"Found: %@", @([v isKindOfClass:[NSArray class]]));
- }
- errorHandler: ^(NSError* err) {
+ } errorHandler: ^(NSError* err) {
NSLog(@"OOPS: %@", err);
}];
parser.supportPartialDocuments = YES;
diff --git a/api/4.0/Classes/SBJsonParser.html b/api/4.0/Classes/SBJsonParser.html
index f86ab5ba..a97ad25b 100644
--- a/api/4.0/Classes/SBJsonParser.html
+++ b/api/4.0/Classes/SBJsonParser.html
@@ -142,7 +142,7 @@
Overview
Parse JSON Strings and NSData objects
-This uses SBJsonInternalParser internally.
+This uses SBJsonStreamParser internally.
diff --git a/api/4.0/Classes/SBJsonStreamParser.html b/api/4.0/Classes/SBJsonStreamParser.html
new file mode 100644
index 00000000..ebfd8ff8
--- /dev/null
+++ b/api/4.0/Classes/SBJsonStreamParser.html
@@ -0,0 +1,384 @@
+
+
+
+
+ SBJsonStreamParser Class Reference
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Inherits from
+ NSObject
+
+ Declared in
+ SBJsonStreamParser.h
+
+
+
+
+
+
+
+
+
Overview
+
Low-level Stream parser
+
+
You most likely want to use the SBJsonChunkParser instead, but if you
+really need low-level access to tokens one-by-one you can use this class.
+
+
+
+
+
+
+
+
+
Tasks
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Properties
+
+
+
+
delegate
+
+
+
+
@property (nonatomic, weak) id<> delegate
+
+
+
+
+
+
+
maxDepth
+
+
+
+
@property (nonatomic) NSUInteger maxDepth
+
+
+
+
+
+
+
state
+
+
+
+
@property (nonatomic, weak) SBJsonStreamParserState *state
+
+
+
+
+
+
+
stateStack
+
+
+
+
@property (nonatomic, readonly, strong) NSMutableArray *stateStack
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Methods
+
+
+
+
parse:
+
+
+
+
- (SBJsonParserStatus)parse:(NSData *)data
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/api/4.0/Protocols/SBJsonStreamParserDelegate.html b/api/4.0/Protocols/SBJsonStreamParserDelegate.html
new file mode 100644
index 00000000..430d0188
--- /dev/null
+++ b/api/4.0/Protocols/SBJsonStreamParserDelegate.html
@@ -0,0 +1,777 @@
+
+
+
+
+ SBJsonStreamParserDelegate Protocol Reference
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Conforms to
+ NSObject
+
+ Declared in
+ SBJsonStreamParser.h
+
+
+
+
+
+
+
+
+
Overview
+
Delegate for interacting directly with the low-level parser
+
+
You will most likely find it much more convenient to use the SBJsonChunkParser instead.
+
+
+
+
+
+
+
+
+
Tasks
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Methods
+
+
+
+
parser:foundBoolean:
+
+
+
+
+
Called when a boolean value is found
+
+
+
+
+
- (void)parser:(SBJsonStreamParser *)parser foundBoolean:(BOOL)x
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Declared In
+ SBJsonStreamParser.h
+
+
+
+
+
+
+
+
parser:foundError:
+
+
+
+
+
Called when an error occurs
+
+
+
+
+
- (void)parser:(SBJsonStreamParser *)parser foundError:(NSError *)err
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Declared In
+ SBJsonStreamParser.h
+
+
+
+
+
+
+
+
parser:foundNumber:
+
+
+
+
+
Called when a number is found
+
+
+
+
+
- (void)parser:(SBJsonStreamParser *)parser foundNumber:(NSNumber *)num
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Declared In
+ SBJsonStreamParser.h
+
+
+
+
+
+
+
+
parser:foundObjectKey:
+
+
+
+
+
Called when object key is found
+
+
+
+
+
- (void)parser:(SBJsonStreamParser *)parser foundObjectKey:(NSString *)key
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Declared In
+ SBJsonStreamParser.h
+
+
+
+
+
+
+
+
parser:foundString:
+
+
+
+
+
Called when a string is found
+
+
+
+
+
- (void)parser:(SBJsonStreamParser *)parser foundString:(NSString *)string
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Declared In
+ SBJsonStreamParser.h
+
+
+
+
+
+
+
+
parserFoundArrayEnd:
+
+
+
+
+
Called when array end is found
+
+
+
+
+
- (void)parserFoundArrayEnd:(SBJsonStreamParser *)parser
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Declared In
+ SBJsonStreamParser.h
+
+
+
+
+
+
+
+
parserFoundArrayStart:
+
+
+
+
+
Called when array start is found
+
+
+
+
+
- (void)parserFoundArrayStart:(SBJsonStreamParser *)parser
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Declared In
+ SBJsonStreamParser.h
+
+
+
+
+
+
+
+
parserFoundNull:
+
+
+
+
+
Called when a null value is found
+
+
+
+
+
- (void)parserFoundNull:(SBJsonStreamParser *)parser
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Declared In
+ SBJsonStreamParser.h
+
+
+
+
+
+
+
+
parserFoundObjectEnd:
+
+
+
+
+
Called when object end is found
+
+
+
+
+
- (void)parserFoundObjectEnd:(SBJsonStreamParser *)parser
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Declared In
+ SBJsonStreamParser.h
+
+
+
+
+
+
+
+
parserFoundObjectStart:
+
+
+
+
+
Called when object start is found
+
+
+
+
+
- (void)parserFoundObjectStart:(SBJsonStreamParser *)parser
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Declared In
+ SBJsonStreamParser.h
+
+
+
+
+
+
+
+
parserShouldSupportManyDocuments:
+
+
+
+
+
Called to determine whether to allow multiple whitespace-separated documents
+
+
+
+
+
- (BOOL)parserShouldSupportManyDocuments:(SBJsonStreamParser *)parser
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Declared In
+ SBJsonStreamParser.h
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/api/4.0/hierarchy.html b/api/4.0/hierarchy.html
index 9aa757e0..4695a496 100644
--- a/api/4.0/hierarchy.html
+++ b/api/4.0/hierarchy.html
@@ -43,6 +43,8 @@ Class Hierarchy
SBJsonParser
+ SBJsonStreamParser
+
SBJsonStreamWriter
SBJsonWriter
@@ -58,6 +60,13 @@ Class Hierarchy
+
Protocol References
+
+
Category References
SBJsonChunkParser *parser = [[SBJsonChunkParser alloc] initWithBlock:^(id v) {
+ NSLog(@"Found: %@", @([v isKindOfClass:[NSArray class]]));
+ } errorHandler: ^(NSError* err) {
+ NSLog(@"OOPS: %@", err);
+ }];
+ parser.supportManyDocuments = YES;
+
+ // Note that this input contains multiple top-level JSON documents
+ NSData *json = [@"[]{}[]{}" dataWithEncoding:NSUTF8StringEncoding];
+ [parser parse:data];
+
+
+
The above example will print:
+
+
+Found: YES
+Found: NO
+Found: YES
+Found: NO
+
+
+
+
Sometimes you just get a single mammoth array containing lots of smaller
+documents. In that case you can get the same effect by setting
+supportPartialDocuments to YES:
+
+
SBJsonChunkParser *parser = [[SBJsonChunkParser alloc] initWithBlock:^(id v) {
+ NSLog(@"Found: %@", @([v isKindOfClass:[NSArray class]]));
+ } errorHandler: ^(NSError* err) {
+ NSLog(@"OOPS: %@", err);
+ }];
+ parser.supportPartialDocuments = YES;
+
+ // Note that this input contains A SINGLE top-level document
+ NSData *json = [@"[[],{},[],{}]" dataWithEncoding:NSUTF8StringEncoding];
+ [parser parse:data];
+
+
+
This example prints the same output as the one above.
+
+
Additional features:
+
-Streaming Support (see SBJsonStreamParser & SBJsonStreamWriter )
Configurable recursion depth limit
Automatic Reference Counting (ARC)
Optionally sort dictionary keys in JSON output
@@ -135,6 +178,8 @@ Class References
SBJsonParser
+ SBJsonStreamParser
+
SBJsonStreamWriter
SBJsonWriter
@@ -146,6 +191,13 @@ Class References
+
Protocol References
+
+
Category References
diff --git a/api/SBJson.atom b/api/SBJson.atom
index a0c514c0..e12bcb21 100644
--- a/api/SBJson.atom
+++ b/api/SBJson.atom
@@ -1,18 +1,18 @@
- http://sbjson.org/api/SBJson.atom/20131113001244
+ http://sbjson.org/api/SBJson.atom/20131113011952
SBJson Documentation
Copyright © 2013 Stig Brautaset. All rights reserved.
Stig Brautaset
org.brautaset.documentation
- 2013-11-13T00:12:44+00:00
+ 2013-11-13T01:19:52+00:00
tag:sbjson.org,2013-11-13:org.brautaset.SBJson/4.0.0
SBJson Documentation
- 2013-11-13T00:12:44+00:00
+ 2013-11-13T01:19:52+00:00
SBJson Documentation (v4.0.0)
-
+
org.brautaset.SBJson
4.0.0
3.0.0
diff --git a/api/org.brautaset.SBJson-4.0.xar b/api/org.brautaset.SBJson-4.0.xar
index 3cb0831b..21f04c8d 100644
Binary files a/api/org.brautaset.SBJson-4.0.xar and b/api/org.brautaset.SBJson-4.0.xar differ