TTKMusicPlayer  3.7.0.0
TTKMusicPlayer imitates Kugou UI, the music player uses of qmmp core library based on Qt for windows and linux
serializer.h
Go to the documentation of this file.
1 /* This file is part of qjson
2  *
3  * Copyright (C) 2009 Till Adam <adam@kde.org>
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License version 2.1, as published by the Free Software Foundation.
8  *
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with this library; see the file COPYING.LIB. If not, write to
17  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  * Boston, MA 02110-1301, USA.
19  */
20 
21 #ifndef QJSON_SERIALIZER_H
22 #define QJSON_SERIALIZER_H
23 
24 #include "ttkprivate.h"
25 
26 QT_BEGIN_NAMESPACE
27 class QIODevice;
28 class QString;
29 class QVariant;
30 QT_END_NAMESPACE
31 
32 namespace QJson {
103  enum IndentMode {
109  };
152  {
153  public:
154  Serializer();
155 
164  void serialize(const QVariant &variant, QIODevice* out, bool* ok);
165 
176  QByteArray serialize(const QVariant &variant, bool *ok);
177 
181  void allowSpecialNumbers(bool allow);
182 
186  bool specialNumbersAllowed() const;
187 
191  void setIndentMode(IndentMode mode = QJson::IndentNone);
192 
193 
198  void setDoublePrecision(int precision);
199 
203  IndentMode indentMode() const;
204 
208  QString errorMessage() const;
209 
210  private:
211  class SerializerPrivate;
213 
214  };
215 }
216 
217 #endif // QJSON_SERIALIZER_H
#define TTK_MODULE_EXPORT
Main class used to convert QVariant objects to JSON data.
Definition: serializer.h:151
IndentMode
How the indentation should work.
Definition: serializer.h:103
#define TTK_DECLARE_PRIVATE(Class)
Definition: ttkprivate.h:26
Namespace used by QJson.
Definition: parser.h:34
const char int mode
Definition: ioapi.h:135
Main class used to convert QVariant objects to JSON data private.
Definition: serializer.cpp:52