<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.parallelmc.org/w/index.php?action=history&amp;feed=atom&amp;title=Module%3ANiceJSON</id>
	<title>Module:NiceJSON - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.parallelmc.org/w/index.php?action=history&amp;feed=atom&amp;title=Module%3ANiceJSON"/>
	<link rel="alternate" type="text/html" href="https://wiki.parallelmc.org/w/index.php?title=Module:NiceJSON&amp;action=history"/>
	<updated>2026-04-29T03:09:16Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.5</generator>
	<entry>
		<id>https://wiki.parallelmc.org/w/index.php?title=Module:NiceJSON&amp;diff=6435&amp;oldid=prev</id>
		<title>Diamondback88: 1 revision imported: Imported from minecraft.wiki</title>
		<link rel="alternate" type="text/html" href="https://wiki.parallelmc.org/w/index.php?title=Module:NiceJSON&amp;diff=6435&amp;oldid=prev"/>
		<updated>2023-11-05T03:16:25Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported: Imported from minecraft.wiki&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 05:16, 5 November 2023&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Diamondback88</name></author>
	</entry>
	<entry>
		<id>https://wiki.parallelmc.org/w/index.php?title=Module:NiceJSON&amp;diff=6434&amp;oldid=prev</id>
		<title>minecraft&gt;MarkusRost at 11:02, 6 October 2023</title>
		<link rel="alternate" type="text/html" href="https://wiki.parallelmc.org/w/index.php?title=Module:NiceJSON&amp;diff=6434&amp;oldid=prev"/>
		<updated>2023-10-06T11:02:26Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local p = {}&lt;br /&gt;
&lt;br /&gt;
-- encodes the input into JSON&lt;br /&gt;
p.stringify_raw = function(x)&lt;br /&gt;
	local js = mw.text.jsonEncode(x, mw.text.JSON_PRETTY)&lt;br /&gt;
	js = js:gsub(&amp;#039;\r?\n&amp;#039;, &amp;#039; &amp;#039;)&lt;br /&gt;
	js = js:gsub(&amp;#039;  +&amp;#039;, &amp;#039; &amp;#039;)&lt;br /&gt;
	js = mw.text.nowiki(js)&lt;br /&gt;
	return js&lt;br /&gt;
end&lt;br /&gt;
-- encodes input into JSON; returns empty string on error&lt;br /&gt;
p.stringify = function(data)&lt;br /&gt;
	local ok, json = pcall(p.stringify_raw, data)&lt;br /&gt;
	if ok then&lt;br /&gt;
		return json&lt;br /&gt;
	else&lt;br /&gt;
		return &amp;#039;&amp;#039;&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
-- encodes input into JSON and wraps it in the provides tag with class&lt;br /&gt;
-- if no_empty is truthy, returns just an empty string on error; if falsey returns the tag (which has no contents)&lt;br /&gt;
p.wrap = function (data, tag, class, no_empty)&lt;br /&gt;
	local js = p.stringify(data)&lt;br /&gt;
	if js == &amp;#039;&amp;#039; and no_empty then&lt;br /&gt;
		return &amp;#039;&amp;#039;&lt;br /&gt;
	end&lt;br /&gt;
	return string.format(&amp;#039;&amp;lt;%s class=&amp;quot;%s noexcerpt navigation-not-searchable&amp;quot;&amp;gt;%s&amp;lt;/%s&amp;gt;&amp;#039;, tag, class, js, tag)&lt;br /&gt;
end&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>minecraft&gt;MarkusRost</name></author>
	</entry>
</feed>