Skip to main content

EnsLib.JSON.AbstractHost

abstract class EnsLib.JSON.AbstractHost extends Ens.Host

Abstract business host for JSON support

Property Inventory

Method Inventory

Parameters

parameter DEFAULTJSONCLASS = EnsLib.JSON.Message;
parameter SETTINGS = ConvertJson:JSON,JsonClass:JSON:selector?context={Ens.ContextSearch/PersistentJsonClasses},UseDefaultOnFailure:JSON;
Inherited description: Users can specify these values in the Configuration Editor

Properties

property ConvertJson as %Boolean [ InitialExpression = 0 ];
Enable this setting to convert inbound JSON payload to the specified JSON class. A valid JSON class needs to be specified for this setting to take effect.
Property methods: ConvertJsonDisplayToLogical(), ConvertJsonGet(), ConvertJsonIsValid(), ConvertJsonLogicalToDisplay(), ConvertJsonNormalize(), ConvertJsonSet()
property JsonClass as %String (MAXLEN = 128) [ InitialExpression = ..#DEFAULTJSONCLASS ];
The JSON class to convert inbound JSON payload to. It must either extend both %Persistent and %JSON.Adaptor or be EnsLib.JSON.Message. Optionally, this class can extend %XML.Adaptor for better visualization in Visual Trace.
Property methods: JsonClassDisplayToLogical(), JsonClassGet(), JsonClassIsValid(), JsonClassLogicalToDisplay(), JsonClassLogicalToOdbc(), JsonClassNormalize()
property UseDefaultOnFailure as %Boolean [ InitialExpression = 0 ];
Enable this setting if you want to create a message of the default type, instead of returning an error status, when it fails to convert inbound payload to the specified JSON class.
Property methods: UseDefaultOnFailureDisplayToLogical(), UseDefaultOnFailureGet(), UseDefaultOnFailureIsValid(), UseDefaultOnFailureLogicalToDisplay(), UseDefaultOnFailureNormalize(), UseDefaultOnFailureSet()

Methods

classmethod IsJson(message As %RegisteredObject) as %Boolean
This method determines whether a message is a JSON message so the business service may choose not to convert it to JSON if it is not a JSON message. Sub-class responsiblity to override this method and make use of this functionality.

Inherited Members

Inherited Properties

Inherited Methods

Subclasses

FeedbackOpens in a new tab