MocFormat

Format for encoding Mocs as text

Description:

This attribute specifies the format to use when AST Moc Objects are converted to text by a MocChan. There are currently two ways (conventions) by which MOCs may be represented in the form of text and the MocFormat attribute is used to specify which of these should be used:
• " JSON" : Encodes a Moc Object as a JSON string using the JSON serialisation described in the MOC recommendation (version 1.1).

• " STRING" : Encodes a Moc Object as using the string serialisation described in the MOC recommendation (version 1.1).

The value assigned to the MocFormat does not affect the behaviour of the astRead method, which automatically identifies the format used by the external text and sets the MocFormat attribute to the corresponding value.

The astWrite method will create the external text using the format specified by the current value of the MocFormat attribute.

The initial default value of the attribute is " UNKNOWN" .

Type:
String.

Applicability

MocChan
All MocChans have this attribute.