Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 6 additions & 0 deletions Classes/YAJLDocument.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@ extern NSInteger YAJLDocumentStackCapacity;
@param dict Dictionary object was set for key on
*/
- (void)document:(YAJLDocument *)document didSetObject:(id)object forKey:(id)key inDictionary:(NSDictionary *)dict;

/*!
Did reach the end of document.
@param document Sender
*/
- (void)didEndDocument:(YAJLDocument *)document;
@end

/*!
Expand Down
4 changes: 4 additions & 0 deletions Classes/YAJLDocument.m
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,10 @@ - (void)_pop {
dict_ = (NSMutableDictionary *)value;
currentType_ = YAJLDecoderCurrentTypeDict;
}
if ([stack_ count] == 0) {
if ([delegate_ respondsToSelector:@selector(didEndDocument:)])
[delegate_ didEndDocument:self];
}
}

@end