HS.REST.Model.ISerializable
class HS.REST.Model.ISerializable extends %Library.RegisteredObject, %pkg.isc.json.adaptor, %pkg.isc.rest.model.iSerializable
Interface for JSON-serializable/deserializable objects.For HS, by default use %pkg.isc.json.adaptor.
Method Inventory
Parameters
parameter %JSONFIELDNAMEASCAMELCASE = 1;
%JSONFIELDNAMEASCAMELCASE auto-generates the %JSONFIELDNAME for properties (if not specified)
as camelCase.
parameter %JSONIGNOREINVALIDFIELD = 1;
The %JSONIGNOREINVALIDFIELD parameter allows the programmer to control handling of unexpected fields in the JSON input.
The default (%JSONIGNOREINVALIDFIELD = 0) will treat an unexpected field as an error.
If %JSONIGNOREINVALIDFIELD is set = 1, then unexpected fields will be ignored.
NEED to have this field set to 1 by default for cross version compatibility. Say for example, a subclass of this is available on a client and server instance and the client instance has a higher version. Then when sending the payload of this class to the server, the client may have new properties that the server would not understand. These should be ignored and the response would then indicate the subset of properties that the server DOES understand so the client can react accordngly. Throwing an error instead is less helpful.
NEED to have this field set to 1 by default for cross version compatibility. Say for example, a subclass of this is available on a client and server instance and the client instance has a higher version. Then when sending the payload of this class to the server, the client may have new properties that the server would not understand. These should be ignored and the response would then indicate the subset of properties that the server DOES understand so the client can react accordngly. Throwing an error instead is less helpful.
Methods
method JSONExport() as %Status
Serialize a JSON enabled class as a JSON document and write it to the current device.
method JSONExportToStream(ByRef export As %Stream.Object) as %Status
Serialize a JSON enabled class as a JSON document and write it to a stream.
Serialize a JSON enabled class as a JSON document and return it as a string.
method JSONImport(input) as %Status
JSONImport imports JSON or dynamic object input into this object.
The input argument is either JSON as a string or stream, or a subclass of %DynamicAbstractObject.
The input argument is either JSON as a string or stream, or a subclass of %DynamicAbstractObject.
Inherited Members
Inherited Methods
- %AddToSaveSet()
- %ClassIsLatestVersion()
- %ClassName()
- %ConstructClone()
- %DispatchClassMethod()
- %DispatchGetModified()
- %DispatchGetProperty()
- %DispatchMethod()
- %DispatchSetModified()
- %DispatchSetMultidimProperty()
- %DispatchSetProperty()
- %Extends()
- %GetParameter()
- %IsA()
- %IsModified()
- %JSONExport()
- %JSONExportToStream()
- %JSONExportToString()
- %JSONImport()
- %JSONMappingInfo()
- %JSONNew()
- %New()
- %NormalizeObject()
- %ObjectModified()
- %OriginalNamespace()
- %PackageName()
- %RemoveFromSaveSet()
- %SerializeObject()
- %SetModified()
- %ValidateObject()
Subclasses
- HS.HC.ClientAPI.InstanceConfig.InstanceInfo
- HS.HC.ClientAPI.InstanceConfig.InstanceInfo.MirrorMemberInfo
- HS.HC.ClientAPI.InstanceConfig.NamespaceInfo
- HS.HC.ClientAPI.InstanceConfig.NamespaceInfo.AdditionalConfigParam
- HS.HC.ClientAPI.InstanceConfig.NamespaceInfo.AdditionalInfo
- HS.HC.ClientAPI.InstanceConfig.NamespaceInfo.ProductionInfo
- HS.HC.ClientAPI.InstanceConfig.Payload
- HS.HC.ClientAPI.InstanceConfig.ServerInfo
- HS.HC.SystemConfig.ConfigStep.Common
- HS.REST.AbstractSingleton
- HS.REST.ErrorOne
- HS.REST.ErrorResponse
- HS.REST.Model.Resource
- HS.REST.NegotiationResponse
- HS.Types.SMTP
- HS.Util.DataModel.Adaptor