<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[XML vs JS in Qt. What is more &quot;native&quot; for Qt?]]></title><description><![CDATA[<p dir="auto">Hello all!<br />
I am trying to choose between XML and JSON for transferring data between application instances and got few questions:</p>
<ul>
<li>what is more "native" for Qt?</li>
<li>what is functionality widely for JSON or XML?</li>
<li>what is faster in parsing?</li>
</ul>
]]></description><link>https://forum.qt.io/topic/105998/xml-vs-js-in-qt-what-is-more-native-for-qt</link><generator>RSS for Node</generator><lastBuildDate>Sat, 16 May 2026 15:19:53 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/105998.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 17 Aug 2019 19:09:45 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to XML vs JS in Qt. What is more &quot;native&quot; for Qt? on Tue, 20 Aug 2019 10:09:30 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/bogong">@<bdi>bogong</bdi></a><br />
I think they are both equal in that regards.<br />
The XML is older (i think) then JSON but could not find the exact info.<br />
Internally Qt uses binary / DataStreams.</p>
<p dir="auto">So it seems to save to choose between json/xml based on performance and<br />
memory use concerns + your personal experience with xml.</p>
]]></description><link>https://forum.qt.io/post/546957</link><guid isPermaLink="true">https://forum.qt.io/post/546957</guid><dc:creator><![CDATA[mrjj]]></dc:creator><pubDate>Tue, 20 Aug 2019 10:09:30 GMT</pubDate></item><item><title><![CDATA[Reply to XML vs JS in Qt. What is more &quot;native&quot; for Qt? on Tue, 20 Aug 2019 07:34:22 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mrjj">@<bdi>mrjj</bdi></a> I might be wrong in term "native". I mean what is historically more developed and used solution in Qt.</p>
]]></description><link>https://forum.qt.io/post/546920</link><guid isPermaLink="true">https://forum.qt.io/post/546920</guid><dc:creator><![CDATA[bogong]]></dc:creator><pubDate>Tue, 20 Aug 2019 07:34:22 GMT</pubDate></item><item><title><![CDATA[Reply to XML vs JS in Qt. What is more &quot;native&quot; for Qt? on Mon, 19 Aug 2019 15:34:57 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/bogong">@<bdi>bogong</bdi></a><br />
Well both will be slow with a 2GB file.<br />
However, XML has also has<br />
<a href="https://doc.qt.io/qt-5/qxmlsimplereader.html#details" target="_blank" rel="noopener noreferrer nofollow ugc">https://doc.qt.io/qt-5/qxmlsimplereader.html#details</a><br />
which is a SAX interface that reduces the memory requirements<br />
compared to the XML Dom parser / json that will fully<br />
populate an internal "tree" of the file.</p>
<p dir="auto">Also, Qt is a framework. Not a language so all its classes are<br />
the same level of "native". :)</p>
]]></description><link>https://forum.qt.io/post/546843</link><guid isPermaLink="true">https://forum.qt.io/post/546843</guid><dc:creator><![CDATA[mrjj]]></dc:creator><pubDate>Mon, 19 Aug 2019 15:34:57 GMT</pubDate></item><item><title><![CDATA[Reply to XML vs JS in Qt. What is more &quot;native&quot; for Qt? on Mon, 19 Aug 2019 15:13:35 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mrjj">@<bdi>mrjj</bdi></a> sure, I know it - this is the main reason to question about "more native".</p>
]]></description><link>https://forum.qt.io/post/546842</link><guid isPermaLink="true">https://forum.qt.io/post/546842</guid><dc:creator><![CDATA[bogong]]></dc:creator><pubDate>Mon, 19 Aug 2019 15:13:35 GMT</pubDate></item><item><title><![CDATA[Reply to XML vs JS in Qt. What is more &quot;native&quot; for Qt? on Mon, 19 Aug 2019 07:34:07 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/bogong">@<bdi>bogong</bdi></a><br />
ok.<br />
please test with 2GB json/xml before deciding.<br />
It might not have acceptable performance for your use case.</p>
]]></description><link>https://forum.qt.io/post/546750</link><guid isPermaLink="true">https://forum.qt.io/post/546750</guid><dc:creator><![CDATA[mrjj]]></dc:creator><pubDate>Mon, 19 Aug 2019 07:34:07 GMT</pubDate></item><item><title><![CDATA[Reply to XML vs JS in Qt. What is more &quot;native&quot; for Qt? on Mon, 19 Aug 2019 07:25:46 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mrjj">@<bdi>mrjj</bdi></a> said in <a href="/post/546746">XML vs JS in Qt. What is more "native" for Qt?</a>:</p>
<blockquote>
<p dir="auto">How much data do you plan to save ?</p>
</blockquote>
<p dir="auto">It's unpredictable and depend on situation. Might be 2 bite might be + 2Gb</p>
]]></description><link>https://forum.qt.io/post/546747</link><guid isPermaLink="true">https://forum.qt.io/post/546747</guid><dc:creator><![CDATA[bogong]]></dc:creator><pubDate>Mon, 19 Aug 2019 07:25:46 GMT</pubDate></item><item><title><![CDATA[Reply to XML vs JS in Qt. What is more &quot;native&quot; for Qt? on Mon, 19 Aug 2019 07:24:14 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/bogong">@<bdi>bogong</bdi></a><br />
ok. also a good xml editor helps with all the end tags.</p>
<p dir="auto">Btw i forgot to ask</p>
<p dir="auto">How much data do you plan to save ?</p>
]]></description><link>https://forum.qt.io/post/546746</link><guid isPermaLink="true">https://forum.qt.io/post/546746</guid><dc:creator><![CDATA[mrjj]]></dc:creator><pubDate>Mon, 19 Aug 2019 07:24:14 GMT</pubDate></item><item><title><![CDATA[Reply to XML vs JS in Qt. What is more &quot;native&quot; for Qt? on Mon, 19 Aug 2019 07:24:02 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mrjj">@<bdi>mrjj</bdi></a> For hand-writing it's mater of experience only. I've started to use XML more than 10 years ago and beside all of it huge experience in HTML/CSS. For me doesn't matter at all which is better for handwriting. BTW - Microsoft *.docx format it's ZIPed XML. And a lot of applications using XML for data exchange. But it's only historically, XML appeared earlier than JSON especially in enterprise applications.</p>
]]></description><link>https://forum.qt.io/post/546744</link><guid isPermaLink="true">https://forum.qt.io/post/546744</guid><dc:creator><![CDATA[bogong]]></dc:creator><pubDate>Mon, 19 Aug 2019 07:24:02 GMT</pubDate></item><item><title><![CDATA[Reply to XML vs JS in Qt. What is more &quot;native&quot; for Qt? on Mon, 19 Aug 2019 07:18:50 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/bogong">@<bdi>bogong</bdi></a><br />
Just as info.<br />
we tested XML / JSON for our project.<br />
In most cases, xml is more verbose and we found json<br />
generally nicer to work with.<br />
Its easy to handwrite some json.<br />
xml, not so much.</p>
]]></description><link>https://forum.qt.io/post/546742</link><guid isPermaLink="true">https://forum.qt.io/post/546742</guid><dc:creator><![CDATA[mrjj]]></dc:creator><pubDate>Mon, 19 Aug 2019 07:18:50 GMT</pubDate></item><item><title><![CDATA[Reply to XML vs JS in Qt. What is more &quot;native&quot; for Qt? on Mon, 19 Aug 2019 07:14:30 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mrjj">@<bdi>mrjj</bdi></a> Thx</p>
]]></description><link>https://forum.qt.io/post/546740</link><guid isPermaLink="true">https://forum.qt.io/post/546740</guid><dc:creator><![CDATA[bogong]]></dc:creator><pubDate>Mon, 19 Aug 2019 07:14:30 GMT</pubDate></item><item><title><![CDATA[Reply to XML vs JS in Qt. What is more &quot;native&quot; for Qt? on Mon, 19 Aug 2019 07:14:07 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/bogong">@<bdi>bogong</bdi></a><br />
None of them is more native than the other.<br />
Both is just classes using Qt types.</p>
]]></description><link>https://forum.qt.io/post/546738</link><guid isPermaLink="true">https://forum.qt.io/post/546738</guid><dc:creator><![CDATA[mrjj]]></dc:creator><pubDate>Mon, 19 Aug 2019 07:14:07 GMT</pubDate></item><item><title><![CDATA[Reply to XML vs JS in Qt. What is more &quot;native&quot; for Qt? on Mon, 19 Aug 2019 07:11:33 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mrjj">@<bdi>mrjj</bdi></a> <a class="plugin-mentions-user plugin-mentions-a" href="/user/jksh">@<bdi>JKSH</bdi></a> and others ... Thanks for replies, but never the less ... What about topic of this thread? What is more native JSON and XML?</p>
]]></description><link>https://forum.qt.io/post/546736</link><guid isPermaLink="true">https://forum.qt.io/post/546736</guid><dc:creator><![CDATA[bogong]]></dc:creator><pubDate>Mon, 19 Aug 2019 07:11:33 GMT</pubDate></item><item><title><![CDATA[Reply to XML vs JS in Qt. What is more &quot;native&quot; for Qt? on Mon, 19 Aug 2019 07:09:53 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jksh">@<bdi>jksh</bdi></a> Is there any example of using CBOR? Be honest - I've never heard about it ... And the same questions about Long Term Storing, how about it?</p>
]]></description><link>https://forum.qt.io/post/546734</link><guid isPermaLink="true">https://forum.qt.io/post/546734</guid><dc:creator><![CDATA[bogong]]></dc:creator><pubDate>Mon, 19 Aug 2019 07:09:53 GMT</pubDate></item><item><title><![CDATA[Reply to XML vs JS in Qt. What is more &quot;native&quot; for Qt? on Mon, 19 Aug 2019 07:05:28 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mrjj">@<bdi>mrjj</bdi></a> Thx for reply I just updated question. And there might be various data types.</p>
]]></description><link>https://forum.qt.io/post/546732</link><guid isPermaLink="true">https://forum.qt.io/post/546732</guid><dc:creator><![CDATA[bogong]]></dc:creator><pubDate>Mon, 19 Aug 2019 07:05:28 GMT</pubDate></item><item><title><![CDATA[Reply to XML vs JS in Qt. What is more &quot;native&quot; for Qt? on Mon, 19 Aug 2019 07:07:55 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/bogong">@<bdi>bogong</bdi></a><br />
Hi<br />
Yes. should be.<br />
At least for the normal use cases.<br />
Also if you use mostly Qt types for the int / floats etc then<br />
very little hand-holding is needed.</p>
<p dir="auto">update:<br />
Long term. It does support versioning and Qt do not lightly alter its<br />
interfaces so it would be safe for 4 years+, i would say.<br />
However, for very long time storage, json (text) beats binary<br />
as it will always be easier to read in again.</p>
<p dir="auto">I would personally go with json in this use case.</p>
]]></description><link>https://forum.qt.io/post/546729</link><guid isPermaLink="true">https://forum.qt.io/post/546729</guid><dc:creator><![CDATA[mrjj]]></dc:creator><pubDate>Mon, 19 Aug 2019 07:07:55 GMT</pubDate></item><item><title><![CDATA[Reply to XML vs JS in Qt. What is more &quot;native&quot; for Qt? on Mon, 19 Aug 2019 07:18:06 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mrjj">@<bdi>mrjj</bdi></a> There are few questions:</p>
<ul>
<li>QDataStream - Is it ok for cross-platform applications (I mean if I am saving in file for example QVector or QHash data on Andorid device and send it to iOS device will it be equal one another)? There are not linked connection between application instances. It's look like file write by one instance into file and read by another from another whenever it need. Basic idea was to write it in XML or JSON and save it to file.</li>
<li>What about long term storing? What about global Qt policy for serialising. What if I store in file and might be reading it in 4 years for example? Is there option to get at least sources for building driver for reading it if something got changed in future in QDataStream. I've been choosing XML or JSON because of very stable format globally.</li>
</ul>
]]></description><link>https://forum.qt.io/post/546727</link><guid isPermaLink="true">https://forum.qt.io/post/546727</guid><dc:creator><![CDATA[bogong]]></dc:creator><pubDate>Mon, 19 Aug 2019 07:18:06 GMT</pubDate></item><item><title><![CDATA[Reply to XML vs JS in Qt. What is more &quot;native&quot; for Qt? on Sun, 18 Aug 2019 00:41:13 GMT]]></title><description><![CDATA[<p dir="auto">Qt supports CBOR too: <a href="https://doc.qt.io/qt-5/qtcborcommon.html" target="_blank" rel="noopener noreferrer nofollow ugc">https://doc.qt.io/qt-5/qtcborcommon.html</a></p>
<p dir="auto">CBOR is like JSON but more flexible (because it supports more types) and faster (because it transmits binary data instead of human-readable text)</p>
]]></description><link>https://forum.qt.io/post/546615</link><guid isPermaLink="true">https://forum.qt.io/post/546615</guid><dc:creator><![CDATA[JKSH]]></dc:creator><pubDate>Sun, 18 Aug 2019 00:41:13 GMT</pubDate></item><item><title><![CDATA[Reply to XML vs JS in Qt. What is more &quot;native&quot; for Qt? on Sat, 17 Aug 2019 21:46:59 GMT]]></title><description><![CDATA[<p dir="auto">Hi<br />
Just as a note.<br />
it's worth considering/mention that most of Qt class can already be serialized with<br />
QDataStream so if your data structures use Qt types, it's basically just to stream them<br />
and it's easy to send a QDataStream over QTcpSocket or similar in a platform-independent way.<br />
( versioning and endianness support)</p>
<p dir="auto"><a href="https://doc.qt.io/qt-5/datastreamformat.html#" target="_blank" rel="noopener noreferrer nofollow ugc">https://doc.qt.io/qt-5/datastreamformat.html#</a></p>
]]></description><link>https://forum.qt.io/post/546596</link><guid isPermaLink="true">https://forum.qt.io/post/546596</guid><dc:creator><![CDATA[mrjj]]></dc:creator><pubDate>Sat, 17 Aug 2019 21:46:59 GMT</pubDate></item><item><title><![CDATA[Reply to XML vs JS in Qt. What is more &quot;native&quot; for Qt? on Sat, 17 Aug 2019 19:17:08 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">Qt has classes for both.</p>
<p dir="auto">The questions are rather:</p>
<ul>
<li>what do you want to exchange ?</li>
<li>how do you want to exchange it ?</li>
<li>is it web related ?</li>
</ul>
]]></description><link>https://forum.qt.io/post/546585</link><guid isPermaLink="true">https://forum.qt.io/post/546585</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Sat, 17 Aug 2019 19:17:08 GMT</pubDate></item></channel></rss>