Issue with yajil_buf_load_tree From a VARCHAR string
Posted: Tue Aug 15, 2023 9:14 pm
I am currently using YAJL to deconstruct a JSON string.
I am using: docNode = yajl_buf_load_tree(%addr(GetUri_Out) : %len(%trim(GetUri_Out)) : ErrMsg );
I am using GETURI to get mu HTTP Response and the GetUri_Out is a varchar(1048576) value holding the web response. When using the code above I get “parse error: premature EOF”. If I move the GetUri_Out to a char(1048576) value it works with no errors.
For performance purposes I do not wish to move a varchar to a char in order to process it. Is there a way to load a varchar value using yajl_buf_load_tree or is there another method I should be using?
Thanks,
Angel Bermudez
I am using: docNode = yajl_buf_load_tree(%addr(GetUri_Out) : %len(%trim(GetUri_Out)) : ErrMsg );
I am using GETURI to get mu HTTP Response and the GetUri_Out is a varchar(1048576) value holding the web response. When using the code above I get “parse error: premature EOF”. If I move the GetUri_Out to a char(1048576) value it works with no errors.
For performance purposes I do not wish to move a varchar to a char in order to process it. Is there a way to load a varchar value using yajl_buf_load_tree or is there another method I should be using?
Thanks,
Angel Bermudez