Skip to content

Instantly share code, notes, and snippets.

@gabriel
Created July 1, 2009 08:45
Show Gist options
  • Save gabriel/138680 to your computer and use it in GitHub Desktop.
Save gabriel/138680 to your computer and use it in GitHub Desktop.
YAJLParser *parser = [[[YAJLParser alloc] initWithParserOptions:0] autorelease];
parser.delegate = self;
// A chunk of data comes...
YAJLParserStatus status = [parser parse:chunk1];
// 'status' should be YAJLParserStatusInsufficientData, if its not finished
if (parser.parserError) ...;
// Another chunk of data comes...
YAJLParserStatus status = [parser parse:chunk2];
// 'status' should be YAJLParserStatusOK if its finished
if (parser.parserError) ...;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment