资源简介
使用VS2010和QT4.8编译的QJson库文件,包含dll文件还有lib文件,Release的为qjson.lib qjson.dll, Debug版本为qjsond.lib qjsond.dll,include下为包含文件。添加lib和include到工程下,dll文件和exe放在同级目录下面即可
代码片段和文件信息
/* This file is part of QJson
*
* Copyright (C) 2008 Flavio Castelli
* Copyright (C) 2013 Silvio Moioli
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1 as published by the Free Software Foundation.
*
*
* This library is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this library; see the file COPYING.LIB. If not write to
* the Free Software Foundation Inc. 51 Franklin Street Fifth Floor
* Boston MA 02110-1301 USA.
*/
#include “json_scanner.cc“
#include “qjson_debug.h“
#include “json_scanner.h“
#include “json_parser.hh“
#include
#include
#include
#include
JSonScanner::JSonScanner(QIODevice* io)
: m_allowSpecialNumbers(false)
m_io (io)
m_criticalError(false)
m_C_locale(QLocale::C)
{
}
JSonScanner::~JSonScanner()
{
}
void JSonScanner::allowSpecialNumbers(bool allow) {
m_allowSpecialNumbers = allow;
}
int JSonScanner::yylex(YYSTYPE* yylval yy::location *yylloc) {
m_yylval = yylval;
m_yylloc = yylloc;
m_yylloc->step();
int result = yylex();
if (m_criticalError) {
return -1;
}
return result;
}
int JSonScanner::LexerInput(char* buf int max_size) {
if (!m_io->isOpen()) {
qCritical() << “JSonScanner::yylex - io device is not open“;
m_criticalError = true;
return 0;
}
int readBytes = m_io->read(buf max_size);
if(readBytes < 0) {
qCritical() << “JSonScanner::yylex - error while reading from io device“;
m_criticalError = true;
return 0;
}
return readBytes;
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2015-04-23 09:22 QJson\
目录 0 2015-04-23 10:50 QJson\bin\
文件 138752 2015-04-23 09:11 QJson\bin\qjson.dll
文件 363008 2015-04-23 10:49 QJson\bin\qjsond.dll
目录 0 2015-04-23 08:46 QJson\doc\
文件 78377 2015-03-18 04:04 QJson\doc\Doxyfile
文件 953 2015-03-18 04:04 QJson\doc\footer.html
文件 317 2015-03-18 04:04 QJson\doc\header.html
文件 2124 2015-03-18 04:04 QJson\doc\qjson.dox
目录 0 2015-04-23 08:46 QJson\include\
目录 0 2015-04-23 09:24 QJson\include\QJson\
文件 6217 2015-03-18 04:04 QJson\include\QJson\FlexLexer.h
文件 9125 2015-03-18 04:04 QJson\include\QJson\json_parser.hh
文件 1775 2015-03-18 04:04 QJson\include\QJson\json_scanner.h
文件 4857 2015-03-18 04:04 QJson\include\QJson\location.hh
文件 20 2015-04-23 09:24 QJson\include\QJson\Parser
文件 2982 2015-03-18 04:04 QJson\include\QJson\parser.h
文件 1936 2015-03-18 04:04 QJson\include\QJson\parserrunnable.h
文件 1431 2015-03-18 04:04 QJson\include\QJson\parser_p.h
文件 4634 2015-03-18 04:04 QJson\include\QJson\position.hh
文件 1147 2015-03-18 04:04 QJson\include\QJson\qjson_debug.h
文件 1205 2015-03-18 04:04 QJson\include\QJson\qjson_export.h
文件 27 2015-04-23 09:24 QJson\include\QJson\Qob
文件 4299 2015-03-18 04:04 QJson\include\QJson\qob
文件 24 2015-04-23 09:24 QJson\include\QJson\Serializer
文件 6229 2015-03-18 04:04 QJson\include\QJson\serializer.h
文件 2179 2015-03-18 04:04 QJson\include\QJson\serializerrunnable.h
文件 3143 2015-03-18 04:04 QJson\include\QJson\stack.hh
目录 0 2015-04-23 10:50 QJson\lib\
文件 23032 2015-04-23 09:11 QJson\lib\qjson.lib
文件 23098 2015-04-23 09:08 QJson\lib\qjsond.lib
............此处省略25个文件信息
评论
共有 条评论