Question
· May 20, 2021

##class(%ZEN.Auxiliary.jsonProvider).%ObjectToJSON() don't show %DynamicObject items

Hello everyone,

I created a Class with this 3 properties

Class TestDynamic Extends (%RegisteredObject, %XML.Adaptor)
{

Property number As %xsd.string;

Property exam As %xsd.string;

Property result As list Of %DynamicObject;

}

I'm adding objects to list normally

set objTest=##class(TestDynamic).%New()
set objDynamic={"field":"value"}
do objTest.result.Insert(objDynamic)

But when i use this method to convert to JSON

##class(%ZEN.Auxiliary.jsonProvider).%ObjectToJSON(objTest,,,"aeoqtw")

It doesn't show the items from %DynamicObject just show this:

{
"number": "",
"exam": "",
"result": [
"21@%Library.DynamicObject"
 ]
}

Cheers.

Discussion (7)1
Log in or sign up to continue