Question
· Jun 15, 2017

%RegisteredObject to JSON

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

Discussion (2)0
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(),!