• Jussi Kivilinna's avatar
    netutils/cJSON: add input stream JSON parser · a764aefa
    Jussi Kivilinna authored
    Patch provides new stream parsing engine. Benefits are: parsing input
    string using user supplied getc function, which allows reading input
    directly from files or socket streams (thus avoid temporary buffer
    allocation). Parser has also been fixed to pass all tests in 'json_gtest'
    folder.
    
    From github:thingsee/thingsee-sdk pull request:
    
     "Improve cJSON to allow parse/print from/to stream (caller supplied getc/putc functions) for reducing peak memory usage"
    
     https://github.com/thingsee/thingsee-sdk/pull/6
    
    Signed-off-by: default avatarJussi Kivilinna <jussi.kivilinna@haltian.com>
    (cherry picked from commit ed7c67771fcc97ffc9726241d6db70b24b0c0995)
    a764aefa
cJSON_stream_parse.c 18.5 KB