- Log in to post comments
i believe that is what i'm looking for,
thank you
- Log in to post comments
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,
- Log in to post comments
yep, along with those there could be others, formGroup, requiredWith, ect...
thanks,