1 #include "serializerrunnable.h"
3 /* This file is part of qjson
5 * Copyright (C) 2009 Flavio Castelli <flavio@castelli.name>
6 * 2009 Frank Osterfeld <osterfeld@kde.org>
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License version 2.1, as published by the Free Software Foundation.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public License
19 * along with this library; see the file COPYING.LIB. If not, write to
20 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 * Boston, MA 02110-1301, USA.
24 #include "parserrunnable.h"
25 #include "serializer.h"
27 #include <QtCore/QDebug>
28 #include <QtCore/QVariant>
30 using namespace QJson;
32 class SerializerRunnable::Private
38 SerializerRunnable::SerializerRunnable(QObject* parent)
43 qRegisterMetaType<QVariant>("QVariant");
46 SerializerRunnable::~SerializerRunnable()
51 void SerializerRunnable::setJsonObject( const QVariant& json )
56 void SerializerRunnable::run()
58 Serializer serializer;
59 emit parsingFinished( Serializer().serialize( d->json ), true, QString() );