yajl-objc icon indicating copy to clipboard operation
yajl-objc copied to clipboard

parser:didAdd: does not fire for isolated number.

Open bnickel opened this issue 13 years ago • 1 comments

Sending the parser @"1.0" does not result in a value because the parser does not know if more data is pending. Conversely @"true", @"null", and @\"test\"" work because the parser infers a complete object.

I believe the correct approach would be to add a [parser close] method which invokes yajl_complete_parse that can be executed when the end of the stream is reached.

bnickel avatar Oct 24 '12 19:10 bnickel

Close could also detach the delegate to reduce the risk of a memory leak.

bnickel avatar Oct 24 '12 19:10 bnickel