If I have a JSON object or array,
I found ^jsonwrite() to print it to the outputstream.
The only function I found to write to files is ^export.
Playing around I found that I can print it with some overhead like this:
$$jsoncontent = ^jsonwrite($$jsonobject0)
^createfact(JSONFILE JSONFILE $$jsoncontent)
@3 = ^query(direct_sv JSONFILE JSONFILE)
^export(myjson.txt @3)
Sadly
^export(myjson.txt @3object)
doesn’t seem to be working.
So how can I just write pure JSON, without any overhead, to a file to parse it in some other application?