The JsonTemplateTagSet function changes all of the tag placeholders in the JSON template string to the current tag value.
int @JsonTemplateTagSet(ref string jsonContent);
Parameters
string jsonContent : JSON string to process (the modified content will be returned)
Return Values
1 : Success
0 : Failure
Example )
string templateID = "template1";
string templateString = @JsonTemplateLoad(templateID); // Load the JSON template saved as template1. The templateString variable returns the template default value.
@JsonTemplateReplacePlaceholder(templateID , "#NAME#", "Hong Gil-dong", "string"); // Change the placeholder written as #NAME# to the string "Hong Gil-dong".
@JsonTemplateReplacePlaceholder(templateID , "#AGE#", 20, "int"); // Change the placeholder written as #AGE# to the integer 20.
templateString = @JsonTemplateReplaceDone(templateID); // Apply the registered placeholder values to the JSON template.
@JsonTemplateTagSet(templateString); // Change all tag placeholders written as #$AI_0000# to the current tag values.
@JsonTemplateReplaceMissing(templateString); // Replace remaining placeholders (#OOO#) with null.
@ObjectSetText("Text1", templateString); // Display the final JSON template string in the Text1 text element.
Version information
Supported Version: 10.3.6.25 or later
Related Helps)
JsonTemplateReplacePlaceholder