<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://www.computercraft.info/wiki/index.php?action=history&amp;feed=atom&amp;title=Textutils.serializeJSON</id>
		<title>Textutils.serializeJSON - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://www.computercraft.info/wiki/index.php?action=history&amp;feed=atom&amp;title=Textutils.serializeJSON"/>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Textutils.serializeJSON&amp;action=history"/>
		<updated>2026-07-11T06:12:54Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.24.1</generator>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Textutils.serializeJSON&amp;diff=7325&amp;oldid=prev</id>
		<title>Bomb Bloke: CC 1.76</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Textutils.serializeJSON&amp;diff=7325&amp;oldid=prev"/>
				<updated>2015-12-26T02:13:27Z</updated>
		
		<summary type="html">&lt;p&gt;CC 1.76&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 02:13, 26 December 2015&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 2:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 2:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Function&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Function&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|name=textutils.serializeJSON&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|name=textutils.serializeJSON&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|args={{type|table}}/{{type|string}}/{{type|number}}/{{type|boolean}} data&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|args={{type|table}}/{{type|string}}/{{type|number}}/{{type|boolean}} data &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;[, {{type|boolean}} unquote keys]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|returns={{type|string}} serializedData&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|returns={{type|string}} serializedData&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|desc=Returns a JSON representation of the data &amp;lt;var&amp;gt;data&amp;lt;/var&amp;gt; in a form of a {{type|string}}, mainly for [[Commands (API)|command usage]]. There is a special key in &amp;lt;var&amp;gt;textutils&amp;lt;/var&amp;gt; table: &amp;lt;var&amp;gt;textutils.EMPTY_ARRAY&amp;lt;/var&amp;gt; which represents an empty JSON array ( &amp;lt;var&amp;gt;[&amp;lt;nowiki/&amp;gt; ]&amp;lt;/var&amp;gt; ). You can use it to serialize an empty JSON array inside, for example a table.&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;br/&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|desc=Returns a JSON representation of the data &amp;lt;var&amp;gt;data&amp;lt;/var&amp;gt; in a form of a {{type|string}}, mainly for [[Commands (API)|command usage]]. There is a special key in &amp;lt;var&amp;gt;textutils&amp;lt;/var&amp;gt; table: &amp;lt;var&amp;gt;textutils.EMPTY_ARRAY&amp;lt;/var&amp;gt; which represents an empty JSON array ( &amp;lt;var&amp;gt;[&amp;lt;nowiki/&amp;gt; ]&amp;lt;/var&amp;gt; ). You can use it to serialize an empty JSON array inside, for example a table.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;br/&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;As of ComputerCraft 1.76, setting the second parameter to true strips the quotes that would otherwise be placed around the key-names in the output. Although outside of the JSON standard, this is required by ''most'' (but not all!) Minecraft commands.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Commands in the commands API which accept multiple parameters will automatically make use of this function if a table is included among them (and should also pick up on the correct key format, based on the command name). [[Commands_(API)#commands..3Ccommand.3E.28.29.2Fcommands.async..3Ccommand.3E.28.29|See here]] for details.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Also exists as textutils.seriali'''s'''eJSON. Requires CC 1.7 or later.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Also exists as textutils.seriali'''s'''eJSON. Requires CC 1.7 or later.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|api=textutils&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|api=textutils&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key ccraft_wiki-mw_:diff:version:1.11a:oldid:6880:newid:7325 --&gt;
&lt;/table&gt;</summary>
		<author><name>Bomb Bloke</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Textutils.serializeJSON&amp;diff=6880&amp;oldid=prev</id>
		<title>MKlegoman357: Created page with &quot;{{lowercase}} {{Function |name=textutils.serializeJSON |args={{type|table}}/{{type|string}}/{{type|number}}/{{type|boolean}} data |returns={{type|string}} serializedData |desc...&quot;</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Textutils.serializeJSON&amp;diff=6880&amp;oldid=prev"/>
				<updated>2015-02-16T20:41:13Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{lowercase}} {{Function |name=textutils.serializeJSON |args={{type|table}}/{{type|string}}/{{type|number}}/{{type|boolean}} data |returns={{type|string}} serializedData |desc...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{lowercase}}&lt;br /&gt;
{{Function&lt;br /&gt;
|name=textutils.serializeJSON&lt;br /&gt;
|args={{type|table}}/{{type|string}}/{{type|number}}/{{type|boolean}} data&lt;br /&gt;
|returns={{type|string}} serializedData&lt;br /&gt;
|desc=Returns a JSON representation of the data &amp;lt;var&amp;gt;data&amp;lt;/var&amp;gt; in a form of a {{type|string}}, mainly for [[Commands (API)|command usage]]. There is a special key in &amp;lt;var&amp;gt;textutils&amp;lt;/var&amp;gt; table: &amp;lt;var&amp;gt;textutils.EMPTY_ARRAY&amp;lt;/var&amp;gt; which represents an empty JSON array ( &amp;lt;var&amp;gt;[&amp;lt;nowiki/&amp;gt; ]&amp;lt;/var&amp;gt; ). You can use it to serialize an empty JSON array inside, for example a table.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Also exists as textutils.seriali'''s'''eJSON. Requires CC 1.7 or later.&lt;br /&gt;
|api=textutils&lt;br /&gt;
|addon=ComputerCraft&lt;br /&gt;
|examples=&lt;br /&gt;
{{Example&lt;br /&gt;
|desc=Serializes a table into JSON and prints it.&lt;br /&gt;
|code=local myTable = {&lt;br /&gt;
   key = &amp;quot;value&amp;quot;,&lt;br /&gt;
   anotherKey = true,&lt;br /&gt;
   number = 5,&lt;br /&gt;
   array = {1, 2, 3},&lt;br /&gt;
   emptyArray = '''textutils.EMPTY_ARRAY'''&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 [[print]]( '''textutils.serializeJSON( myTable )''' )&lt;br /&gt;
|output=&amp;lt;var&amp;gt;{&amp;quot;key&amp;quot;:&amp;quot;value&amp;quot;,&amp;quot;anotherKey&amp;quot;:true,&amp;quot;number&amp;quot;:5,&amp;quot;array&amp;quot;:[1,2,3],&amp;quot;emptyArray&amp;quot;:[]}&amp;lt;/var&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:API_Functions]]&lt;/div&gt;</summary>
		<author><name>MKlegoman357</name></author>	</entry>

	</feed>