Replies:

It does not seem like the XData block parameters for the JSON mappings supports something like that.
I did the following to get a different output value on the JSON. It is not the prettiest solution.

Class Test.JSONThings Extends (%Persistent, %XML.Adaptor, %JSON.Adaptor)
{

Property Name As %String;

Property Surname As %String;

Property Gender As %String(DISPLAYLIST = ",Male,Female", JSONLISTPARAMETER = "DISPLAYLIST", VALUELIST = ",M,F");

Property SomeOtherGender As %String(DISPLAYLIST = ",Man,Vrou", JSONLISTPARAMETER = "DISPLAYLIST", VALUELIST = ",M,F") [ Calculated, SqlComputeCode = { set {*}={Gender} }, SqlComputed, Transient ];

Property Age As %Integer; Property Notes As %String(MAXLEN = ""); Property Code As Test.JSONRef(%JSONREFERENCE = "ID");

XData NSMapping
{
<Mapping xmlns="http://www.intersystems.com/jsonmapping">
        <Property Name="Name" FieldName="Name"/>
        <Property Name="Surname" FieldName="Surname"/>
        <Property Name="SomeOtherGender" FieldName="Gender"/>
</Mapping>
}

}

Hi,

Apologies. My mind must have been in the wrong place. I was looking at it from the Ensemble message browser's side for some reason.

Hiya,

Should it be a WebSocket, or can it be a TCP counted socket connection?

If TCP counted, there are adapters available in Ensemble/IRIS, you  just need to create the business operation for the server-side, and the business service for the client-side.
You can use the EnsLib.TCP.CountedXMLOutboundAdapter  adapter, and the related inbound adapter.
In the operation you will have to serialise the Ensemble message to XML, and vice versa on the service.
Both these adapters have built-in functionality to ensure connections are up and running, and you can set up alerting controls on it.

I have never sent Ensemble messages directly like this to another instance, so I can't comment on if it will work or not.

Followers:
Stefan has no followers yet.
Following:
Global Masters badges:
Stefan has no Global Masters badges yet.