CopyDocument

CopyDocument 1:

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

CopyDocument 2: Return value

Name

Type

CopyDocument

UDINT

CopyDocument 3: Inputs

Name

Type

nDoc

UDINT

CopyDocument 4:/CopyDocument 5: Inputs/Outputs

Name

Type

pDoc

STRING

CopyDocument 6: Outputs

Name

Type

hrErrorCode

HRESULT

Sample call:

fbJson.CopyDocument(sTargetString, SIZEOF(sTargetString));