Initial commit.

This commit is contained in:
Jonas Kvinge
2018-02-27 18:06:05 +01:00
parent 85d9664df7
commit b2b1ba7abe
1393 changed files with 177311 additions and 1 deletions

1851
3rdparty/qjson/doc/Doxyfile vendored Normal file

File diff suppressed because it is too large Load Diff

32
3rdparty/qjson/doc/footer.html vendored Normal file
View File

@@ -0,0 +1,32 @@
<hr>
<table width="100%">
<tr>
<td width="10%" align="left" valign="center">
<a href="http://sourceforge.net">
<img
src="http://sourceforge.net/sflogo.php?group_id=144446"
width="88" height="31" border="0" alt="SourceForge Logo"></a>
</td>
<td width="20%" align="left" valign="center">
hosts this site.
</td>
<td>
</td>
<td align="right" valign="center">
Send comments to:<br>
<a href="mailto:qjson-devel@lists.sourceforge.net">QJson Developers</a>
</td>
</tr>
</table>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-3214988-2");
pageTracker._trackPageview();
</script>
</body>
</html>

13
3rdparty/qjson/doc/header.html vendored Normal file
View File

@@ -0,0 +1,13 @@
<html>
<head>
<title>
QJson - a Qt based library for mapping JSON data to QVariant objects
</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#ffffff">
<a href="http://qjson.sourceforge.net">QJson home page</a>
<hr>

87
3rdparty/qjson/doc/qjson.dox vendored Normal file
View File

@@ -0,0 +1,87 @@
/**
\mainpage
\section _intro Introduction
<a HREF="http://www.json.org/">JSON (JavaScript Object Notation)</a>
is a lightweight data-interchange format.
It can represents integer, real number, string, an ordered sequence of value, and
a collection of name/value pairs.
QJson is a qt-based library that maps JSON data to QVariant objects.
JSON arrays will be mapped to QVariantList instances, while JSON's objects will
be mapped to QVariantMap.
\section _usage Usage
Converting JSON's data to QVariant instance is really simple:
\code
// create a JSonDriver instance
QJson::Parser parser;
bool ok;
// json is a QString containing the data to convert
QVariant result = parser.parse (json, &ok);
\endcode
Suppose you're going to convert this JSON data:
\verbatim
{
"encoding" : "UTF-8",
"plug-ins" : [
"python",
"c++",
"ruby"
],
"indent" : { "length" : 3, "use_space" : true }
}
\endverbatim
The following code would convert the JSON data and parse it:
\code
QJson::Parser parser;
bool ok;
QVariantMap result = parser.parse (json, &ok).toMap();
if (!ok) {
qFatal("An error occured during parsing");
exit (1);
}
qDebug() << "encoding:" << result["encoding"].toString();
qDebug() << "plugins:";
foreach (QVariant plugin, result["plug-ins"].toList()) {
qDebug() << "\t-" << plugin.toString();
}
QVariantMap nestedMap = result["indent"].toMap();
qDebug() << "length:" << nestedMap["length"].toInt();
qDebug() << "use_space:" << nestedMap["use_space"].toBool();
\endcode
The output would be:
\verbatim
encoding: "UTF-8"
plugins:
- "python"
- "c++"
- "ruby"
length: 3
use_space: true
\endverbatim
The QJson::QObjectHelper class permits to serialize QObject instances into JSON. QJson::QObjectHelper also allows to
initialize a QObject using the values stored inside of a JSON object.
\section _build Build instructions
QJson build system is based on cmake. Download QJson sources, extract them, move inside the sources directory and then:
\code
mkdir build
cd build
cmake ..
make
sudo make install
\endcode
\author Flavio Castelli <flavio@castelli.name>
*/