summaryrefslogtreecommitdiffstats
path: root/src/corelib/json/qjsonwriter_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@nokia.com>2012-01-18 10:12:50 +0100
committerQt by Nokia <qt-info@nokia.com>2012-01-24 15:28:20 +0100
commit37a7b035f8feb248d25741b22e22ffb0ec7463d6 (patch)
tree8f323ed9ef5554d8debae92ba0a95f05d6162d3b /src/corelib/json/qjsonwriter_p.h
parent4b8ceb41aed352f10d36db5284453f425dbc5f3f (diff)
Import json support from playground/qtbinaryjson
This imports the JSON support for Qt 5 from playground/qtbinaryjson. It adds a fast, fully compliant json parser, a convenient C++ API, conversion to and from QVariants and a binary format for JSON that is extremely fast to use together with the C++ API. Change-Id: If9e3a21a4241d388d0abaa446b6824f9cc6edb1c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/json/qjsonwriter_p.h')
-rw-r--r--src/corelib/json/qjsonwriter_p.h73
1 files changed, 73 insertions, 0 deletions
diff --git a/src/corelib/json/qjsonwriter_p.h b/src/corelib/json/qjsonwriter_p.h
new file mode 100644
index 0000000000..f517b8e21e
--- /dev/null
+++ b/src/corelib/json/qjsonwriter_p.h
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QJSONWRITER_P_H
+#define QJSONWRITER_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+#include <qjsonvalue.h>
+
+QT_BEGIN_NAMESPACE
+
+namespace QJsonPrivate
+{
+
+class Writer
+{
+public:
+ static void objectToJson(const QJsonPrivate::Object *o, QByteArray &json, int indent, bool compact = false);
+ static void arrayToJson(const QJsonPrivate::Array *a, QByteArray &json, int indent, bool compact = false);
+};
+
+}
+
+QT_END_NAMESPACE
+
+#endif