<?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[Using external Json file in QML [Qt5&#x2F;QML2]]]></title><description><![CDATA[<p dir="auto">Hey Qt-Project members</p>
<p dir="auto">I've tried the last 3 hours getting a external Json file loading in my QML / Javascript logic.</p>
<p dir="auto">@    var jsonObj ={"test" : ["a","b","c","d","e","f","g","h"],}<br />
...<br />
console.log(jsonObj.test[0])@</p>
<p dir="auto">This works quite well but is there a way to store the Json data in a separate file?</p>
<p dir="auto">thanks<br />
Eli</p>
]]></description><link>https://forum.qt.io/topic/21855/using-external-json-file-in-qml-qt5-qml2</link><generator>RSS for Node</generator><lastBuildDate>Fri, 14 Aug 2026 21:37:24 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/21855.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 01 Dec 2012 17:23:49 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Using external Json file in QML [Qt5&#x2F;QML2] on Tue, 04 Dec 2012 14:23:42 GMT]]></title><description><![CDATA[<p dir="auto">Thanks but it looks like the easiest way to solve this is to write an Json object in an normal javascript file :)</p>
<p dir="auto">Eli</p>
]]></description><link>https://forum.qt.io/post/158631</link><guid isPermaLink="true">https://forum.qt.io/post/158631</guid><dc:creator><![CDATA[[[global:former-user]]]]></dc:creator><pubDate>Tue, 04 Dec 2012 14:23:42 GMT</pubDate></item><item><title><![CDATA[Reply to Using external Json file in QML [Qt5&#x2F;QML2] on Mon, 03 Dec 2012 00:01:57 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">Use the LocalStorage submodule of QtQuick2 to store things to a database.  Alternatively, write your own simple file storage QObject-derived type, and expose it as a singleton type or ordinary type, and use it to write out the string to file.  You can use JSON.parse() and JSON.stringify() in the JS environment supported by QML in Qt5.</p>
<p dir="auto">Cheers,<br />
Chris.</p>
]]></description><link>https://forum.qt.io/post/158500</link><guid isPermaLink="true">https://forum.qt.io/post/158500</guid><dc:creator><![CDATA[chrisadams]]></dc:creator><pubDate>Mon, 03 Dec 2012 00:01:57 GMT</pubDate></item></channel></rss>