Skip to content

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

@lettoka

Description

@lettoka

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions