Question
prabakaran a · Jun 15, 2017

%RegisteredObject to JSON

How to export the %RegisteredObject to JSON in Cache 2016.2?

0
0 814
Discussion (2)2
Log in or sign up to continue

The jsonProvider code may also be invoked from a non-Zen context by calling one of the following APIs:

  • %WriteJSONFromArray
  • %WriteJSONFromObject
  • %WriteJSONStreamFromArray
  • %WriteJSONStreamFromObject
  • %ConvertJSONToObject

proof

Example:

##class(%ZEN.Auxiliary.jsonProvider).%WriteJSONStreamFromObject(.stream,..%OpenId(1),,,1,"aelqoc")
"<- json = ",stream.Read(),!

16.2 has %ZEN.Auxiliary.altJSONProvider, which has same method signatures but may be preferable (faster).