Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision | |||
| ref:a_f:f:af:list_to_json [2026/08/13 00:43] – removed - external edit (Unknown date) 127.0.0.1 | ref:a_f:f:af:list_to_json [2026/08/13 00:43] (current) – ↷ Page moved from a_f:f:af:list_to_json to ref:a_f:f:af:list_to_json localdev | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | < | ||
| + | DELETE THE TAGS THAT ARE NOT APPLICABLE TO THIS FUNCTION AND THEN DELETE THIS COMMENT AND ADD THE VERSION NUMBER (LAST ITEM IN TAG LIST) THAT INTRODUCES THE FUNCTION | ||
| + | </ | ||
| + | {{tag> | ||
| + | ====== LIST_TO_JSON ====== | ||
| + | |||
| + | ===== Description ===== | ||
| + | Converts a list of business objects into a JSON string. Specified attributes of each list member are printed out. | ||
| + | ===== Parameters ===== | ||
| + | - A list to print out or a query finding business objects to print | ||
| + | - If a list is specified an additional parameter can be optionally specified to contain sorting criteria in the Rule Language format. | ||
| + | - Second, third, fourth and other parameters - attribute specification to include in JSON. | ||
| + | - Attribute specification consists of an attribute name, optionally followed by a JSON name and format separated by @ delimiter. | ||
| + | - If an attribute name starts with the # symbol the content of the attribute value is already a JSON formatted string which just needs to be inserted. | ||
| + | - Returns a text string representing members of the list converted to JSON | ||
| + | ===== Example ===== | ||
| + | <code aim> | ||
| + | This produces the following string: | ||
| + | <code aim> | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | }, | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | ... | ||
| + | </ | ||