Hallo to everyone,
I need to insert a JSON file like a field of another JSON file.
The scenario is this : I have yet ready a WSS that give me back a complex Json about customer order. This is developed via IWS and I'd like to reuse it.
Now I have the necessity to give back information about a lot of orders, for example all the orders of the same customer. So I need a bigger Json output. I can't do this with IWS, due to the limit of 16 MB.
So I develop a my own web server (following Mr. Scott instructions, YAILSERVER) that received a Json request via POST and have to give back like result another Json.
The idea was to call the existing WSS for every order and merge all the json in one big unique flow.
To do this I use the yajl_addCharPtr instructions. But I have the problem that insert escape character for every json field. For example :
[{"environment_db":"AS400","company_cod":"RUI","ord er_no":
while should be [{"environment_db":"AS400"," and so on
Perhaps I undestood bad, but using yajl_genOpen(*on:*on); doesn't change the result.
I tried so to work directly with yajl buffer
rc = yajl_getBuf(yajl_buffer_ptr: yajl_buffer_len) ;
but I am not able to expand the buffer with additional data. A memcopy instructions not function
memcpy(yajl_buffer_ptr + offset : %addr(megaDS): megaDs_len) ;
I suppose that in same way I have to incremente the memory for the buffer ... But I am not able to find how to do it.
Someone that in past encountered the same problem ?
Best regards
Nalesso Antonio
I need to insert a JSON file like a field of another JSON file.
The scenario is this : I have yet ready a WSS that give me back a complex Json about customer order. This is developed via IWS and I'd like to reuse it.
Now I have the necessity to give back information about a lot of orders, for example all the orders of the same customer. So I need a bigger Json output. I can't do this with IWS, due to the limit of 16 MB.
So I develop a my own web server (following Mr. Scott instructions, YAILSERVER) that received a Json request via POST and have to give back like result another Json.
The idea was to call the existing WSS for every order and merge all the json in one big unique flow.
To do this I use the yajl_addCharPtr instructions. But I have the problem that insert escape character for every json field. For example :
[{"environment_db":"AS400","company_cod":"RUI","ord er_no":
while should be [{"environment_db":"AS400"," and so on
Perhaps I undestood bad, but using yajl_genOpen(*on:*on); doesn't change the result.
I tried so to work directly with yajl buffer
rc = yajl_getBuf(yajl_buffer_ptr: yajl_buffer_len) ;
but I am not able to expand the buffer with additional data. A memcopy instructions not function
memcpy(yajl_buffer_ptr + offset : %addr(megaDS): megaDs_len) ;
I suppose that in same way I have to incremente the memory for the buffer ... But I am not able to find how to do it.
Someone that in past encountered the same problem ?
Best regards
Nalesso Antonio
Comment