qt5base-lts/qmake/library
Morten Johan Sørvig 89ef515177 Add JSON parsing support to qmake.
Add qjson* implementation files from corelib/json
to the qmake build. Add a read-only compile mode,
enabled by defining QT_JSON_READONLY.

Add qmake built-in function parseJson(file, into)
which parses a json file into the given variable.

qmake uses a flat key -> value-list implementation
for storing variables, which means that some hackery
is need to represent arbitrarily nested JSON. Use a
special "_KEYS_" variable for arrays and objects:

Arrays:
["item1", "item2"]
$${array._KEYS_} -> 0 1 2
$${array.0} -> "item1"
$${array.1} -> "item2"

Objects:
{ "key1" : "value1", "key2" : "value2" }
$${object._KEYS_} -> key1 key2
$${object.key1} -> value1
$${object.key2} -> value2

Change-Id: I0aa2e4e4ae14fa25be8242bc16d3cffce32504d2
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-10-17 08:07:25 +02:00
..
ioutils.cpp minor optimization: don't concatenate strings needlessly 2013-07-19 17:15:16 +02:00
ioutils.h minor optimization: don't concatenate strings needlessly 2013-07-19 17:15:16 +02:00
proitems.cpp fix warning in ProStringList_join 2013-05-07 15:03:11 +02:00
proitems.h update size calculations for assignment statements 2013-05-20 15:20:26 +02:00
qmake_global.h add missing ifdefery 2013-06-12 16:27:10 +02:00
qmakebuiltins.cpp Add JSON parsing support to qmake. 2013-10-17 08:07:25 +02:00
qmakeevaluator_p.h qmake: Update internal mkspec on changes to QMAKESPEC 2013-10-11 21:01:27 +02:00
qmakeevaluator.cpp qmake: Update internal mkspec on changes to QMAKESPEC 2013-10-11 21:01:27 +02:00
qmakeevaluator.h qmake: Evaluate extra configs before loading default_pre 2013-10-11 18:47:27 +02:00
qmakeglobals.cpp make setting a bad $$[QMAKEFEATURES] not crash qmake 2013-10-07 21:01:31 +02:00
qmakeglobals.h make setting a bad $$[QMAKEFEATURES] not crash qmake 2013-10-07 21:01:31 +02:00
qmakeparser.cpp complain about absent files to -pro argument (in lupdate) 2013-08-20 22:56:07 +02:00
qmakeparser.h complain about absent files to -pro argument (in lupdate) 2013-08-20 22:56:07 +02:00
qmakevfs.cpp implement simple VFS to support caching during project parsing 2013-08-07 13:58:41 +02:00
qmakevfs.h implement simple VFS to support caching during project parsing 2013-08-07 13:58:41 +02:00