json.fromStrProp: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
No edit summary
m (Applied Template:MacroFunction)
Line 1: Line 1:
==Function json.fromStrProp==
{{MacroFunction
 
|name=json.fromStrProp
 
|version=1.3b49
 
|description=
'''Introduced in MapTool 1.3b49'''
 
Creates a [[Macros:json object|json object]] from a [[Macros:string property list|string property list]].  
Creates a [[Macros:json object|json object]] from a [[Macros:string property list|string property list]].  


===Usage===
|usage=
<source lang="mtmacro" line>
<source lang="mtmacro" line>
[h: jobj = json.fromStrProp(strProp)]
[h: jobj = json.fromStrProp(strProp)]
</source>
</source>


 
|example=
===Examples===
<source lang="mtmacro" line>
<source lang="mtmacro" line>
[r:json.fromStrProp("a=1;b=44;c=12")]
[r:json.fromStrProp("a=1;b=44;c=12")]
Line 20: Line 17:
Returns
Returns
   {"a":1,"c":12,"b":44}
   {"a":1,"c":12,"b":44}
}}
[[Category:JSON Function]]

Revision as of 02:06, 9 March 2009

json.fromStrProp() Function

Introduced in version 1.3b49

Usage

[h: jobj = json.fromStrProp(strProp)]

Example

[r:json.fromStrProp("a=1;b=44;c=12")]

Returns

{"a":1,"c":12,"b":44}