1. Hi.

Maybe you should use calculated property - something like this:

Class User.CExampleJSON Extends (%RegisteredObject, %JSON.Adaptor, %XML.Adaptor)
{
Property something As %Integer(%JSONINCLUDE = "NONE", DISPLAYLIST = ",OK,Error,Warning", VALUELIST = ",0,1,2") [ InitialExpression = ];

ClassMethod RunMe()
{
      set obj = ..%New()
      set obj.something = 2       
      do obj.%JSONExportToString(.string)
      write "JSON : " _ string,!!!
      write "Content : " _ ..somethingLogicalToDisplay(obj.something),!
}

Property somethingDisplay As %String(%JSONFIELDNAME = "something") [ Calculated ]; Method somethingDisplayGet() As %String [ ServerOnly = ]
{
Quit ..somethingLogicalToDisplay(..something)
}

}

I did some research... Relationship properties with cardinality one or parent are not included by default in JSON serialization. If property is included with parameter %JSONINCLUDE is not enough, because serialization causes infinitive recursion. XData Mapping or %JSONINCLUDE="NONE" in related class should be used to avoid infinitive recursion.

Regards,
Matjaž