资源简介
json.rar

代码片段和文件信息
#include “reader.h“
#include “value.h“
#include
#include
#include
#include
#include
#include
#if _MSC_VER >= 1400 // VC++ 8.0
#pragma warning( disable : 4996 ) // disable warning about strdup being deprecated.
#endif
namespace Json {
static inline bool
in( Reader::Char c Reader::Char c1 Reader::Char c2 Reader::Char c3 Reader::Char c4 )
{
return c == c1 || c == c2 || c == c3 || c == c4;
}
static inline bool
in( Reader::Char c Reader::Char c1 Reader::Char c2 Reader::Char c3 Reader::Char c4 Reader::Char c5 )
{
return c == c1 || c == c2 || c == c3 || c == c4 || c == c5;
}
static bool
containsNewLine( Reader::Location begin
Reader::Location end )
{
for ( ;begin < end; ++begin )
if ( *begin == ‘\n‘ || *begin == ‘\r‘ )
return true;
return false;
}
// Class Reader
// //////////////////////////////////////////////////////////////////
Reader::Reader()
{
}
bool
Reader::parse( const std::string &document
Value &root
bool collectComments )
{
document_ = document;
const char *begin = document_.c_str();
const char *end = begin + document_.length();
return parse( begin end root collectComments );
}
bool
Reader::parse( std::istream& sin
Value &root
bool collectComments )
{
//std::istream_iterator begin(sin);
//std::istream_iterator end;
// Those would allow streamed input from a file if parse() were a
// template function.
// Since std::string is reference-counted this at least does not
// create an extra copy.
std::string doc;
std::getline(sin doc (char)EOF);
return parse( doc root collectComments );
}
bool
Reader::parse( const char *beginDoc const char *endDoc
Value &root
bool collectComments )
{
begin_ = beginDoc;
end_ = endDoc;
collectComments_ = collectComments;
current_ = begin_;
lastValueEnd_ = 0;
lastValue_ = 0;
commentsBefore_ = ““;
errors_.clear();
while ( !nodes_.empty() )
nodes_.pop();
nodes_.push( &root );
bool successful = readValue();
Token token;
skipCommentTokens( token );
if ( collectComments_ && !commentsBefore_.empty() )
root.setComment( commentsBefore_ commentAfter );
return successful;
}
bool
Reader::readValue()
{
Token token;
skipCommentTokens( token );
bool successful = true;
if ( collectComments_ && !commentsBefore_.empty() )
{
currentValue().setComment( commentsBefore_ commentBefore );
commentsBefore_ = ““;
}
switch ( token.type_ )
{
case tokenobjectBegin:
successful = readobject( token );
break;
case tokenArrayBegin:
successful = readArray( token );
break;
case tokenNumber:
successful = decodeNumber( token );
break;
case tokenString:
successful = decodeString( token );
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
....... 457 2010-11-19 10:31 json\autoli
....... 1429 2010-11-19 10:31 json\config.h
....... 648 2010-11-19 10:31 json\forwards.h
....... 186 2010-11-19 10:31 json\json.h
....... 4054 2010-11-19 10:31 json\json_batchallocator.h
....... 13117 2010-11-19 10:31 json\json_internalarray.inl
....... 16899 2010-11-19 10:31 json\json_internalmap.inl
....... 17582 2010-11-19 10:31 json\json_reader.cpp
....... 40412 2010-11-19 10:31 json\json_value.cpp
....... 6592 2010-11-19 10:31 json\json_valueiterator.inl
....... 19957 2010-11-19 10:31 json\json_writer.cpp
....... 5947 2010-11-19 10:31 json\reader.h
....... 34630 2010-11-19 10:31 json\value.h
....... 6376 2010-11-19 10:31 json\writer.h
目录 0 2010-11-19 10:37 json
----------- --------- ---------- ----- ----
168286 15
相关资源
- Notepad++ 32位 jsonview插件
- notepad++ json格式化插件
- Jsonviewer2 for Notepad++ 64 bit
-
Notepad++xm
l格式化插件和json格式化插 -
Volley获取json和xm
l数据解析显示 - eCharts全国及各省、市、县地图层jso
- 编译好的json_lib.lib 包含64位,32位,头
- json格式化工具.zip
- 易语言JSON解析模块2.0源码
- echart地图 34省js及json文件 344地级js
- 全国各省市地json图
- 宁夏省市地图js和json文件
- echarts生成json地图最新版
- 中国国界和省界的GeoJson格式数据
- 中国地图_GeoJson文件
- 全国市级地图json文件
- echart 全国/各省份以及各地级市JSON文
- Echarts省市级地图js,json数据
- 全国各省、市、区json的Echarts地图
- 2018行政区划数据_省市区街居_五级_
- Json.net
- Notepad++的Json格式化插件win32和x64两版
- json获取datatable后生成table分页显示c
- 实现yarnlock与packagelockjson相互转换
- advanced rest client definitions.json
- 复杂的json字符串解析真实案例
- .net2.0中生成和解析JSON
- 2018年5月更新最新全国省市区县geojs
- echarts全国省市地图js、json数据
- Newtonsoft.json.dll v4.5.11
评论
共有 条评论