Hello,
I can not find the solution of my issue using YAJL.
Could you help ?
In the buffer of YAJL, I can only see the first line (beginObj line). nothing else.
In my program, I do basically :
yajl_genOpen(*off);
yajl_beginObj('');
yajl_addChar('nb': %char(nb_res));
yajl_addChar('result_msg': %trim(result_msg));
yajl_endObj();
str = YAJL_CopyBufStr();
yajl_genClose();
str contains only "".
I can see this information message in the job log :
do_genValue: received YAJL generator status 4 for type code 1
To be noted : my program is called by a ws program.
This ws program has done earlier :
DATA-INTO request %DATA(%trim(json)
: 'doc=string case=convert allowmissing=yes')
%PARSER('YAJLINTO');
but I think there is no need to close anything after the DATA-INTO...
Weirdly, I do not get any issue with very other similar programs.
Many thanks,
Mélanie
do_genValue: received YAJL generator status 4 for type code 1
Re: do_genValue: received YAJL generator status 4 for type code 1
I have found the solution.
I had written : yajl_beginObj(''); to create an object with no name... but it should be without quotes like :
yajl_beginObj();
Thanks all for reading,
Mélanie
I had written : yajl_beginObj(''); to create an object with no name... but it should be without quotes like :
yajl_beginObj();
Thanks all for reading,
Mélanie