json.toStrProp: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
Verisimilar (talk | contribs) m (Applied Template:MacroFunction) |
||
Line 1: | Line 1: | ||
= | {{MacroFunction | ||
|name=json.toStrProp | |||
|version=1.3b49 | |||
|description= | |||
Creates a [[Macros:string property list|string list]] from a [[Macros:json object|json object]]. With the specified delimiter, if a delimiter is not provided then the default value of ';' is used. | Creates a [[Macros:string property list|string list]] from a [[Macros:json object|json object]]. With the specified delimiter, if a delimiter is not provided then the default value of ';' is used. | ||
|usage= | |||
<source lang="mtmacro" line> | <source lang="mtmacro" line> | ||
[h: strProp = json.toStrProp(jobj)] | [h: strProp = json.toStrProp(jobj)] | ||
Line 13: | Line 11: | ||
</source> | </source> | ||
|example= | |||
<source lang="mtmacro" line> | <source lang="mtmacro" line> | ||
[h:a=json.fromStrProp("a=1;b=44;c=12")] [r:json.toStrProp(a)] | [h:a=json.fromStrProp("a=1;b=44;c=12")] [r:json.toStrProp(a)] | ||
Line 23: | Line 20: | ||
a=1;c=12;b=44 | a=1;c=12;b=44 | ||
0=a;1=1;2=g;3=4 | 0=a;1=1;2=g;3=4 | ||
}} | |||
[[Category:JSON Function]] |
Revision as of 02:24, 9 March 2009
json.toStrProp() Function
• Introduced in version 1.3b49
Creates a string list from a json object. With the specified delimiter, if a delimiter is not provided then the default value of ';' is used.
Usage
[h: strProp = json.toStrProp(jobj)]
[h: strProp = json.toStrProp(jobj, delim)]
Example
[h:a=json.fromStrProp("a=1;b=44;c=12")] [r:json.toStrProp(a)]
[h:a=json.fromList("a,1,g,4")][r:json.toStrProp(a)]
Returns
a=1;c=12;b=440=a;1=1;2=g;3=4