JsonTemplateReplaceDone

 

The JsonTemplateReplaceDone function applies a list of registered placeholder changes to a JSON template and returns a JSON template string..

The placeholder value is registered as a @JsonTemplateReplacePlaceholder function.

 

string @JsonTemplateReplaceDone(string templateId);

 

Parameters

string tempateId  : Target Template ID

  

Return Values

On success, the placeholder returns a JSON string with replaced

Return an empty string on 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)

JsonStructNew

JsonAppend

JsonSet

JsonToString

JsonClear

JsonGet

JsonFromString

JsonSetValue

JsonGetValue

JsonClearAll

JsonStringGetValue

JsonStringSetValue

JsonTemplateLoad

JsonTemplateReplacePlaceholder

JsonTemplateReplaceDone

JsonTemplateReplaceMissing

JsonTemplateTagSet