User bio
404 bio not found
Member since Nov 18, 2018
Replies:

the part about the syntax changing in versions 2016.2+,

however, the initial question, and perhaps i did not make it clear was a way to project an object (such as Samples.Person) to JSON /dynamic object.

the example in pre 2016.2 version was: 

set person=##class(Sample.Person).%OpenId(1)
write person.$toJSON()

however i have not found a "api" using dynamic objects to do the same, something like this:

set person=##class(Sample.Person).%OpenId(1)

write person.%toJSON()

other than using the %ZEN.Auxiliary.altJSONProvider methods,

which i can live with,

i could also create my own method to "walk" the class properties and build the json/dynamic object myself,

which brings me to a follow up question:

is there a way to add custom property parameters, not a class parameter but the parameters you would see in the inspector within studio for a given property: CALCSELECTIVITY, CAPTION, COLLATION, CONTENT, etc...

the idea i have would be to add parameters i can use to include/exclude various properties from code that is accessing data from the class based on user "level" or other criteria.

thanks,

Certifications & Credly badges:
randall has no Certifications & Credly badges yet.
Global Masters badges:
randall has no Global Masters badges yet.
Followers:
randall has no followers yet.
Following:
randall has not followed anybody yet.