astGetMocString

Get the JSON or string-encoded representation of a Moc

Description:

This function stores the JSON or string-encoded representation of the supplied Moc in the supplied string buffer.

Synopsis

void astGetMocString( AstMoc this, int json, size_t mxsize, char string, size_t size, int status )

Parameters:

this
Pointer to the Moc.
json
If non-zero, the Moc is encoded using JSON serialisation. Otherwise it is encoded using string-serialisation.
mxsize
The length of the supplied string buffer in bytes. An error will be reported if this value is smaller than the number required to describe the Moc. However, if zero is supplied, the buffer will be ignored - no string will be returned but the required size of the buffer will still be returned in size .
string
Pointer to the area of memory in which to return the JSON or string-encoded representation of the Moc. This area is assumed to contain at least mxsize bytes. Only used if mxsize is greater than zero. Note, the string is not null-terminated.
size
Returned holding the number of bytes needed to store the complete JSON or string-encoded representation of the Moc.