Skip to content
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

parse() returns true not only when the whole JSON added #5

Open
lettoka opened this issue Nov 18, 2019 · 0 comments
Open

parse() returns true not only when the whole JSON added #5

lettoka opened this issue Nov 18, 2019 · 0 comments

Comments

@lettoka
Copy link

lettoka commented Nov 18, 2019

Hey,
First of all thanks for the awesome library, i really love it.
I use webhooks and get large response data(about 8KB) and I use the Subscription handler you did in the example. It works fine except that the parse() function returns true not only when whole data was recieved. I counted it with a variable and for a 8500 Byte hook response the code in the if(parser.parse()) condition ran 8 times. Is there any way i can check its the last piece of the data I just recieved so the condition will be true once per every webhook response? I could count the "{" and "}" characters to be sure I recieved the whole JSON, but I'm wondering should the parse function return true when its not a full object or is there a better way to find the end of the JSON than counting "{" and "}".

Thanks,
Levi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant