Simple JSON Parser / Serializer in Qt

Today XML and JSON are hot formats for data exchange. While Qt natively supports XML, it doesnt support JSON (well directly). Most developers use external libraries like qjson to serialize QVariantMap objects to a json-string and parse json-string into QVariantMap. One of the key disadvantages of using qjson (or maybe even other libraries) is the license. qjson for example is a LGPL library, which means using it in mobile phone apps might not be a good idea, where the general interest is to not have external dependencies. So the question is – “is it possible to have a JSON serializer/parser using Qt only – without too much of an effort. The answer is YES! Continue reading “Simple JSON Parser / Serializer in Qt”