青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品

Hello World!

程序員那點事兒

首頁 新隨筆 聯系 聚合 管理
  20 Posts :: 6 Stories :: 0 Comments :: 0 Trackbacks
用libjson的時候,怎么也找不到parse方法,后來一查才知道,需要設置選項,把jsonOptions.h粘上來
#ifndef JSON_OPTIONS_H
#define JSON_OPTIONS_H

/**
 *  This file holds all of the compiling options for easy access and so
 *  that you don't have to remember them, or look them up all the time
 
*/


/*
 *  JSON_LIBRARY must be declared if libjson is compiled as a static or dynamic 
 *  library.  This exposes a C-style interface, but none of the inner workings of libjson
 
*/
//#define JSON_LIBRARY


/*
 *  JSON_STRICT removes all of libjson's extensions.  Meaning no comments, no special numbers
 
*/
//#define JSON_STRICT


/*
 *  JSON_DEBUG is used to perform extra error checking.  Because libjson usually 
 *  does on the fly parsing, validation is impossible, so this option will allow
 *  you to register an error callback so that you can record what is going wrong 
 *  before the library crashes.  This option does not protect from these errors,
 *  it simply tells you about them, which is nice for debugging, but not preferable
 *  for release candidates
 
*/
#define JSON_DEBUG


/*
 *  JSON_ISO_STRICT turns off all code that uses non-standard C++.  This removes all
 *  references to long long and long double as well as a few others
 
*/
//#define JSON_ISO_STRICT


/*
 *  JSON_SAFE performs similarly to JSON_DEBUG, except this option does protect
 *  from the errors that it encounters.  This option is recommended for those who
 *  feel it's possible for their program to encounter invalid json.
 
*/
#define JSON_SAFE


/*
 *  JSON_STDERROR routes error messages to cerr instead of a callback, this 
 *  option hides the callback registering function.  This will usually display
 *  messages in the console
 
*/
//#define JSON_STDERROR


/*
 *  JSON_PREPARSE causes all parsing to be done immediately.  By default, libjson
 *  parses nodes on the fly as they are needed, this makes parsing much faster if
 *  your program gets a lot of information that it doesn't need.  An example of
 *  this would be a client application communicating with a server if the server
 *  returns things like last modified date and other things that you don't use.
 
*/
//#define JSON_PREPARSE


/*
 *  JSON_LESS_MEMORY will force libjson to let go of memory as quickly as it can
 *  this is recommended for software that has to run on less than optimal machines.
 *  It will cut libjson's memory usage by about 20%, but also run slightly slower.
 *  It's recommended that you also compile using the -Os option, as this will also
 *  reduce the size of the library
 
*/
//#define JSON_LESS_MEMORY


/*
 *  JSON_UNICODE tells libjson to use wstrings instead of regular strings, this
 *  means that libjson supports the full array of unicode characters, but also takes
 *  much more memory and processing power.
 
*/
//#define JSON_UNICODE


/*
 *  JSON_REF_COUNT causes libjson to reference count JSONNodes, which makes copying
 *  and passing them around much faster.  It is recommended that this stay on for
 *  most uses
 
*/
#define JSON_REF_COUNT


/*
 *  JSON_BINARY is used to support binary, which is base64 encoded and decoded by libjson,
 *  if this option is not turned on, no base64 support is included
 
*/
//#define JSON_BINARY


/*
 *  JSON_EXPOSE_BASE64 is used to turn on the functionality of libjson's base64 encoding
 *  and decoding.  This may be useful if you want to obfuscate your json, or send binary data over
 *  a network
 
*/
//#define JSON_EXPOSE_BASE64


/*
 *  JSON_ITERATORS turns on all of libjson's iterating functionality.  This would usually
 *  only be turned off while compiling for use with C
 
*/
#define JSON_ITERATORS


/*
 *  JSON_STREAM turns on libjson's streaming functionality.  This allows you to give parts of 
 *  your json into a stream, which will automatically hit a callback when full nodes are
 *  completed
 
*/
//#define JSON_STREAM


/*
 *  JSON_MEMORY_CALLBACKS exposes functions to register callbacks for allocating, resizing,
 *  and freeing memory.  Because libjson is designed for customizability, it is feasible
 *  that some users would like to further add speed by having the library utilize a memory
 *  pool.  With this option turned on, the default behavior is still done internally unless
 *  a callback is registered.  So you can have this option on and not use it.
 
*/
//#define JSON_MEMORY_CALLBACKS


/*
 *  JSON_MEMORY_MANAGE is used to create functionality to automatically track and clean
 *  up memory that has been allocated by the user.  This includes strings, binary data, and
 *  nodes.  It also exposes bulk delete functions.
 
*/
//#define JSON_MEMORY_MANAGE


/*
 *    JSON_MEMORY_POOL Turns on libjson's iteraction with mempool++.  It is more efficient that simply
 *    connecting mempool++ to the callbacks because it integrates things internally and uses a number
 *    of memory pools.  This value tells libjson how large of a memory pool to start out with.  500KB 
 *    should suffice for most cases.  libjson will distribute that within the pool for the best
 *    performance depending on other settings.
 
*/
//#define JSON_MEMORY_POOL 524288


/*
 *  JSON_MUTEX_CALLBACKS exposes functions to register callbacks to lock and unlock
 *  mutexs and functions to lock and unlock JSONNodes and all of it's children.  This 
 *  does not prevent other threads from accessing the node, but will prevent them from
 *  locking it. It is much easier for the end programmer to allow libjson to manage
 *  your mutexs because of reference counting and manipulating trees, libjson automatically
 *  tracks mutex controls for you, so you only ever lock what you need to
 
*/
//#define JSON_MUTEX_CALLBACKS


/*
 *  JSON_MUTEX_MANAGE lets you set mutexes and forget them, libjson will not only keep
 *  track of the mutex, but also keep a count of how many nodes are using it, and delete
 *  it when there are no more references
 
*/
//#define JSON_MUTEX_MANAGE


/*
 *  JSON_NO_C_CONSTS removes consts from the C interface.  It still acts the same way, but
 *  this may be useful for using the header with languages or variants that don't have const
 
*/
//#define JSON_NO_C_CONSTS


/*
 *  JSON_OCTAL allows libjson to use octal values in numbers.
 
*/
//#define JSON_OCTAL


/*
 *  JSON_WRITE_PRIORITY turns on libjson's writing capabilties.  Without this libjson can only
 *  read and parse json, this allows it to write back out.  Changing the value of the writer
 *  changes how libjson compiles, and how fast it will go when writing
 
*/
#define JSON_WRITE_PRIORITY MED


/*
 *  JSON_READ_PRIORITY turns on libjson's reading capabilties.  Changing the value of the reader
 *  changes how libjson compiles, and how fast it will go when writing
 
*/
#define JSON_READ_PRIORITY HIGH


/*
 *  JSON_NEWLINE affects how libjson writes.  If this option is turned on, libjson
 *  will use whatever it's defined as for the newline signifier, otherwise, it will use 
 *  standard unix \n.
 
*/
//#define JSON_NEWLINE "\r\n"  //\r\n is standard for most windows and dos programs


/*
 *  JSON_INDENT affects how libjson writes.  If this option is turned on, libjson
 *  will use \t to indent formatted json, otherwise it will use the number of characters
 *  that you specify.  If this is not turned on, then it will use the tab (\t) character
 
*/
//#define JSON_INDENT "    "


/*
 *  JSON_ESCAPE_WRITES tells the libjson engine to escape special characters when it writes
 *  out.  If this option is turned off, the json it outputs may not adhere to JSON standards
 
*/
//#define JSON_ESCAPE_WRITES


/*
 *  JSON_COMMENTS tells libjson to store and write comments.  libjson always supports
 *  parsing json that has comments in it as it simply ignores them, but with this option
 *  it keeps the comments and allows you to insert further comments
 
*/
//#define JSON_COMMENTS


/*
 *  JSON_WRITE_BASH_COMMENTS will cause libjson to write all comments in bash (#) style
 *  if this option is not turned on, then it will use C-style comments.  Bash comments are
 *  all single line
 
*/
//#define JSON_WRITE_BASH_COMMENTS


/*
 *  JSON_WRITE_SINGLE_LINE_COMMENTS will cause libjson to write all comments in using //
 *  notation, or (#) if that option is on.  Some parsers do not support multiline C comments
 *  although, this option is not needed for bash comments, as they are all single line anyway
 
*/
//#define JSON_WRITE_SINGLE_LINE_COMMENTS


/*
 *  JSON_ARRAY_SIZE_ON_ON_LINE allows you to put small arrays of primitives all on one line
 *  in a write_formatted.  This is common for tuples, like coordinates.  If must be defined 
 *  as an integer
 
*/
//#define JSON_ARRAY_SIZE_ON_ONE_LINE 2


/*
 *  JSON_VALIDATE turns on validation features of libjson.
 
*/
//#define JSON_VALIDATE


/*
 *  JSON_CASE_INSENSITIVE_FUNCTIONS turns on funtions for finding child nodes in a case-
 *  insenititve way
 
*/
//#define JSON_CASE_INSENSITIVE_FUNCTIONS


/*
 *  JSON_INDEX_TYPE allows you th change the size type for the children functions. If this 
 *  option is not used then unsigned int is used.  This option is useful for cutting down
 *  on memory, or using huge numbers of child nodes (over 4 billion)
 
*/
//#define JSON_INDEX_TYPE unsigned int


/*
 *  JSON_BOOL_TYPE lets you change the bool type for the C interface.  Because before C99 there
 *  was no bool, and even then it's just a typedef, you may want to use something else.  If this 
 *  is not defined, it will revert to int
 
*/
//#define JSON_BOOL_TYPE char


/*
 *  JSON_INT_TYPE lets you change the int type for as_int.  If you ommit this option, the default
 *  long will be used
 
*/
//#define JSON_INT_TYPE long


/*
 *  JSON_STRING_HEADER allows you to change the type of string that libjson uses both for the
 *  interface and internally.  It must implement most of the STL string interface, but not all
 *  of it.  Things like wxString or QString should wourk without much trouble
 
*/
//#define JSON_STRING_HEADER "../TestSuite/StringTest.h"


/*
 *  JSON_UNIT_TEST is used to maintain and debug the libjson.  It makes all private
 *  members and functions public so that tests can do checks of the inner workings
 *  of libjson.  This should not be turned on by end users.
 
*/
//#define JSON_UNIT_TEST


/*
 *  JSON_NO_EXCEPTIONS turns off any exception throwing by the library.  It may still use exceptions
 *  internally, but the interface will never throw anything.
 
*/
//#define JSON_NO_EXCEPTIONS


/*
 *  JSON_DEPRECATED_FUNCTIONS turns on functions that have been deprecated, this is for backwards
 *  compatibility between major releases.  It is highly recommended that you move your functions
 *  over to the new equivalents
 
*/
#define JSON_DEPRECATED_FUNCTIONS


/*
 *  JSON_CASTABLE allows you to call as_bool on a number and have it do the 0 or not 0 check,
 *  it also allows you to ask for a string from a number, or boolean, and have it return the right thing.
 *  Without this option, those types of requests are undefined.  It also exposes the as_array, as_node, and cast 
 *  functions
 
*/
//#define JSON_CASTABLE


/*
 *  JSON_SECURITY_MAX_NEST_LEVEL is a security measure added to make prevent against DoS attacks
 *  This only affects validation, as if you are worried about security attacks, then you are
 *  most certainly validating json before sending it to be parsed.  This option allows you to limitl how many
 *  levels deep a JSON Node can go.  128 is a good depth to start with
 
*/
//#define JSON_SECURITY_MAX_NEST_LEVEL 128


/*
 *  JSON_SECURITY_MAX_STRING_LENGTH is another security measure, preventing DoS attacks with very long
 *  strings of JSON.  32MB is the default value for this, this allows large images to be embedded
 
*/
//#define JSON_SECURITY_MAX_STRING_LENGTH 33554432


/*
 *    JSON_SECURITY_MAX_STREAM_OBJECTS is a security measure for streams.  It prevents DoS attacks with
 *    large number of objects hitting the stream all at once.  128 is a lot of objects, but not out of
 *    the question for high speed systems.
 
*/
#define JSON_SECURITY_MAX_STREAM_OBJECTS 128

#endif
posted on 2012-03-26 11:42 hello wold! 閱讀(676) 評論(0)  編輯 收藏 引用 所屬分類: 技術相關
青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            日韩午夜剧场| 久久久久一区二区| 欧美一级网站| 亚洲天堂av图片| 宅男噜噜噜66一区二区| 亚洲精品日韩精品| 亚洲日本免费电影| 美国成人直播| 久久中文字幕一区| 欧美成人国产一区二区| 亚洲第一主播视频| 99精品国产在热久久| 亚洲一区二区三区四区中文| 欧美亚洲在线| 欧美激情自拍| 国产精品一区二区久久久| 国内外成人免费视频| 国产综合色精品一区二区三区| 亚洲国产精品久久人人爱蜜臀 | 久久男人资源视频| 欧美大片在线看| 亚洲精品欧美日韩专区| 在线综合亚洲欧美在线视频| 欧美一区二区精品| 欧美不卡三区| 国产精品一区二区久久| 亚洲日本va午夜在线影院| 亚洲一区二区三区四区视频| 久久精品国产一区二区三区| 欧美激情二区三区| 亚洲你懂的在线视频| 美国成人直播| 国产精品资源在线观看| 99视频精品全部免费在线| 香蕉成人啪国产精品视频综合网| 免费不卡中文字幕视频| 亚洲一区三区电影在线观看| 免费成人av资源网| 免费人成精品欧美精品| 一区二区三区久久网| 亚洲综合好骚| 欧美大胆人体视频| 欧美新色视频| 亚洲精品乱码久久久久久按摩观| 亚洲欧美在线免费| 亚洲日本成人| 欧美一区二区久久久| 国产精品久久久久影院亚瑟| 91久久国产精品91久久性色| 久久亚洲一区二区三区四区| 亚洲视屏在线播放| 欧美日韩www| 亚洲破处大片| 亚洲成人资源网| 久久亚洲视频| 老司机午夜精品视频| 欧美一区综合| 欧美日韩直播| 国产精品wwwwww| 一区二区三区www| 亚洲国产日韩美| 久久综合久久美利坚合众国| 国产一区亚洲一区| 久久久国产精品一区二区中文| 亚洲一区综合| 国产欧美日韩亚洲一区二区三区| 香蕉免费一区二区三区在线观看| 宅男噜噜噜66一区二区66| 欧美午夜精品久久久| 亚洲午夜性刺激影院| 亚洲最新色图| 国产精品成人aaaaa网站 | 亚洲精品乱码| 亚洲高清免费视频| 欧美大片在线看免费观看| 亚洲国产视频一区二区| 欧美国产91| 欧美乱妇高清无乱码| 亚洲欧美在线观看| 欧美激情一二区| 欧美精品国产精品日韩精品| 一个色综合av| 亚洲免费网址| 在线观看欧美视频| 亚洲黄色在线视频| 欧美另类女人| 亚洲欧美日本国产专区一区| 亚洲欧美日韩综合国产aⅴ| 国产啪精品视频| 免费永久网站黄欧美| 美女999久久久精品视频| 一区二区国产在线观看| 亚洲中午字幕| 在线日韩av片| 日韩视频亚洲视频| 国内精品久久久久久久97牛牛| 久久亚洲色图| 欧美日韩国产一区精品一区| 性色av一区二区三区在线观看| 久久精品在线观看| 在线一区二区日韩| 欧美一区二区三区啪啪| 亚洲黄色尤物视频| 亚洲视频在线看| 亚洲东热激情| 亚洲欧美视频在线观看| 亚洲精品影视在线观看| 欧美亚洲在线视频| 日韩午夜av| 久久精品一级爱片| 欧美在线二区| 亚洲午夜伦理| 久久久久一本一区二区青青蜜月| 国产一区二区久久久| 亚洲国产91| 欧美日韩在线一区| 蜜桃久久av| 国产亚洲永久域名| 99这里只有久久精品视频| 一区久久精品| 亚洲午夜精品| 日韩一级黄色大片| 毛片精品免费在线观看| 欧美一区国产在线| 亚洲精品一线二线三线无人区| 亚洲免费视频在线观看| 亚洲欧洲精品一区二区三区波多野1战4 | 一区二区三区精品视频| 夜夜爽夜夜爽精品视频| 欧美一区1区三区3区公司| 一本色道久久综合狠狠躁的推荐| 欧美成人激情视频| 亚洲欧美电影在线观看| 伊人久久大香线| 国产精品国产三级国产普通话99 | 欧美国产精品中文字幕| 日韩一二三在线视频播| 亚洲高清在线视频| 性欧美精品高清| 日韩一区二区精品| 久久夜色精品国产欧美乱极品 | 嫩模写真一区二区三区三州| 国产精品尤物福利片在线观看| 亚洲视频在线一区| 亚洲欧美欧美一区二区三区| 国产精品蜜臀在线观看| 一区二区高清视频| av成人天堂| 欧美婷婷久久| 亚洲午夜一级| 久久精品亚洲精品| 国内精品嫩模av私拍在线观看| 久久精品国产久精国产一老狼| 久久亚洲影音av资源网| 亚洲国产精品久久| 欧美精品一区在线播放| 日韩视频免费观看高清在线视频 | 亚洲另类一区二区| 亚洲综合久久久久| 韩国精品久久久999| 久久久久国产一区二区三区四区| 欧美成人蜜桃| 这里只有精品丝袜| 国产视频精品xxxx| 免费高清在线一区| 一区二区冒白浆视频| 久久久久久久国产| 亚洲精品久久久蜜桃| 欧美日韩中文字幕精品| 午夜宅男久久久| 欧美电影免费观看网站| 一区二区三区视频观看| 国产欧美va欧美va香蕉在| 久久午夜色播影院免费高清| 99国产精品久久久久久久久久 | 亚洲美女色禁图| 久久国产日韩欧美| 99综合在线| 狠狠色狠色综合曰曰| 欧美日韩国产影院| 久久精品国产一区二区电影| 亚洲人成亚洲人成在线观看图片| 亚洲香蕉网站| 在线观看成人网| 国产精品成人aaaaa网站| 久久裸体视频| 亚洲欧美日韩中文播放| 亚洲人成亚洲人成在线观看| 久久久999精品| 亚洲欧美日韩在线不卡| 亚洲久久在线| 亚洲电影免费| 欧美国产精品一区| 久久久精品欧美丰满| 日韩小视频在线观看专区| 麻豆久久婷婷| 久久精品男女| 香蕉久久夜色精品| 亚洲一区二区黄色| 亚洲人成久久|