CopyDocument
This method copies the content of the current JSON object created with the SAX Writer to a target variable of the data type STRING, which can be of any length. The method returns the length of the string (including null termination). If the destination buffer is too small, it is emptied by a null termination and returned as length 0.
Syntax
METHOD CopyDocument : UDINT
VAR_IN_OUT CONSTANT
pDoc : STRING;
END_VAR
VAR_INPUT
nDoc : UDINT;
END_VAR
VAR_OUTPUT
hrErrorCode: HRESULT;
END_VAR
Return value
Name | Type |
---|---|
CopyDocument | UDINT |
Inputs
Name | Type |
---|---|
nDoc | UDINT |
/ Inputs/Outputs
Name | Type |
---|---|
pDoc | STRING |
Outputs
Name | Type |
---|---|
hrErrorCode | HRESULT |
Sample call:
fbJson.CopyDocument(sTargetString, SIZEOF(sTargetString));