WRITE-JSON serialize only records from query

Posted by doa on 09-Aug-2016 06:01

Is it possible to serialize only the records from a query to json (not the full buffer)?

WRITE-JSON seems to alway export all records from the TEMP-TABLE.

Posted by marko.rueterbories on 09-Aug-2016 06:23

This is not possible out of the box.

You need to implement the serialization on your own. If you are on OE Version 11.6 I want to point you to the JsonObject type (documentation.progress.com/.../index.html. With this you can easily build your own valid JSON string.

All Replies

Posted by marko.rueterbories on 09-Aug-2016 06:23

This is not possible out of the box.

You need to implement the serialization on your own. If you are on OE Version 11.6 I want to point you to the JsonObject type (documentation.progress.com/.../index.html. With this you can easily build your own valid JSON string.

Posted by doa on 09-Aug-2016 06:25

My main concern with this was performance but i tried it just now and it is surprisingly fast.

Thank you

Posted by Mike Fechner on 09-Aug-2016 11:46

If the number of records you want to output is reasonably small, I’d define a second temp-table and populate that based on your query – either BUFFER-COPY or you use a ProDataset for the second table and define a DATA-SOURCE on the first temp-table.
 

This thread is closed