Child pages
  • serialize

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
{hidden}
DO NOT EDIT THE CONTENT OF THIS PAGE DIRECTLY, UNLESS YOU KNOW WHAT YOU'RE DOING.
		THE STRUCTURE OF THE CONTENT IS VITAL IN BEING ABLE TO EXTRACT CHANGES FROM THE PAGE AND MERGE THEM BACK INTO SERVOY SOURCE{hidden}
{sub-section:description|text=}{sub-section}\\ 

{table:id=|class=servoy sSummary}{colgroup}{column:width=80px|padding=0px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Method Summary{th}{tr}{tbody}{tr}{td}[Object]{td}{td}[#fromJSON]\(data)
Deserialize from JSON text to an object.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#toJSON]\(obj)
Serialize an object to JSON text.{td}{tr}{tbody}{table}\\ 

{table:id=function|class=servoy sDetail}{colgroup}{column:width=100%|padding=0px}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Method Details{th}{tr}{tbody:id=fromJSON|class=node}{tr:id=name}{td}h6.fromJSON{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Object]{span}{span:id=iets|style=float: left; font-weight: bold;}fromJSON{span}{span:id=iets|style=float: left;}\(data){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:fromJSON_des|trigger=button|text=}{sub-section}{sub-section:fromJSON_des|trigger=none|class=sIndent}DeserializeReplace from JSON text to an object.with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:fromJSON_snc|trigger=button|text=}{sub-section}{sub-section:fromJSON_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:fromJSON_prs|trigger=button|text=}{sub-section}{sub-section:fromJSON_prs|trigger=none|class=sIndent}\{[String]} data
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:fromJSON_ret|trigger=button|text=}{sub-section}{sub-section:fromJSON_ret|trigger=none|class=sIndent}[Object]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:fromJSON_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:fromJSON_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:fromJSON_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:fromJSON_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:fromJSON_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:fromJSON_sam|trigger=none}{code:language=javascript}
var org_array = new Array('A1','F1','Paris-Dakar');
var string_data = plugins.serialize.toJSON(org_array);
var new_array = plugins.serialize.fromJSON(string_data);
application.output(new_array.join('#'));
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=toJSON|class=node}{tr:id=name}{td}h6.toJSON{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}toJSON{span}{span:id=iets|style=float: left;}\(obj){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:toJSON_des|trigger=button|text=}{sub-section}{sub-section:toJSON_des|trigger=none|class=sIndent}SerializeReplace an object to JSON text.with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:toJSON_snc|trigger=button|text=}{sub-section}{sub-section:toJSON_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:toJSON_prs|trigger=button|text=}{sub-section}{sub-section:toJSON_prs|trigger=none|class=sIndent}\{[Object]} obj
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:toJSON_ret|trigger=button|text=}{sub-section}{sub-section:toJSON_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:toJSON_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:toJSON_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:toJSON_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:toJSON_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:toJSON_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:toJSON_sam|trigger=none}{code:language=javascript}
var org_array = new Array('A1','F1','Paris-Dakar');
var string_data = plugins.serialize.toJSON(org_array);
var new_array = plugins.serialize.fromJSON(string_data);
application.output(new_array.join('#'));
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}