精华内容
下载资源
问答
  • lua-rapidjson:基于非常快速的RapidJSON库的Lua JSON模块
  • rapidjson将map转为json——人生苦短,我用rapidjson 直接撸代码: #include #include // 请自己下载开源的rapidjson #include rapidjson/prettywriter.h #include rapidjson/rapidjson.h #include rapidjson/...
  • rapidjson

    2018-07-17 09:13:52
    附件是通过使用腾讯提供的解析json字符串的库,通过熟练使用rapidjson可以方便C++开发者进行json的解析和构造
  • RapidJSON 是一个 C++ 的 JSON 解析器及生成器。它的灵感来自RapidXml 。 RapidJSON 小而全。它同时支持 SAX 和 DOM 风格的 API。SAX 解析器只有约 500 行代码。 RapidJSON 快。它的性能可与 strlen() 相比。可支持 ...
  • 今天小编就为大家分享一篇关于C++中rapidjson组装map和数组array的代码示例,小编觉得内容挺不错的,现在分享给大家,具有很好的参考价值,需要的朋友一起跟随小编来看看吧
  • rapidjson-1.1.0.tar.gz

    2020-08-28 20:10:05
    rapidjson 开发 编译所需要的第三方库, 放上来主要是方便大家下载,这样会比较快一些。!!!!
  • lua-rapidjson, 在快速RapidJSON库上,基于Lua的JSON模块 用于Lua的 RapidJSON绑定 基于快速 RapidJSON C 库的用于 LuaJIT 2.0/2.1 和 Lua 5.1/5. 2/5.的json MODULE 。有关更多信息,Bug 报告和功能请求,请参见项
  • rapidjson-master.zip

    2020-03-03 11:31:33
    RapidJSON 是一个 C++ 的 JSON 解析器及生成器。它的灵感来自 RapidXml。 RapidJSON 小而全。它同时支持 SAX 和 DOM 风格的 API。SAX 解析器只有约 500 行代码。 RapidJSON 快。它的性能可与 strlen() 相比。可...
  • rapidjson库使用总结

    2018-07-17 09:31:46
    附件是自己在使用rapidjson过程中遇到的问题的总结,其中有一些小例子方便自己移植到自己的程序中
  • rapidjson-master

    2017-07-07 20:31:46
    rapidjson-master
  • rapidjson.zip

    2020-09-02 10:22:23
    rapidjson的头文件,在git上下载比较恼火,这里留个备份,也提供给其他需要的人。这里只是头文件,使用方法可以在https://blog.csdn.net/youyicc/article/details/108264082这里查看。
  • rapidjson-zh

    2019-02-24 15:43:39
    rapidjson库的使用手册 RapidJSON 是一个 C++ 的 JSON 解析器及生成器。它的灵感来自 RapidXml。 RapidJSON 小而全。它同时支持 SAX 和 DOM 风格的 API。SAX 解析器只有约 500 行代码。 RapidJSON 快。它的性能可与 ...
  • 此资源采用腾讯RapidJson于vs2017C++环境解析Json文件,下载即可用,RapidJson比较其他JSON解析库更加简单轻便,运行于其他环境的话自己将代码拷贝出去,自行建立新的工程项目即可。
  • rapidjson

    2017-11-21 08:28:12
    // Tencent is pleased to support the open source community by making RapidJSON available. //  // Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved. // // ...
    // Tencent is pleased to support the open source community by making RapidJSON available.
    
    // 
    // Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
    //
    // Licensed under the MIT License (the "License"); you may not use this file except
    // in compliance with the License. You may obtain a copy of the License at
    //
    // http://opensource.org/licenses/MIT
    //
    // Unless required by applicable law or agreed to in writing, software distributed 
    // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 
    // CONDITIONS OF ANY KIND, either express or implied. See the License for the 
    // specific language governing permissions and limitations under the License.


    #ifndef RAPIDJSON_RAPIDJSON_H_
    #define RAPIDJSON_RAPIDJSON_H_


    /*!\file rapidjson.h
        \brief common definitions and configuration
        
        \see RAPIDJSON_CONFIG
     */


    /*! \defgroup RAPIDJSON_CONFIG RapidJSON configuration
        \brief Configuration macros for library features


        Some RapidJSON features are configurable to adapt the library to a wide
        variety of platforms, environments and usage scenarios.  Most of the
        features can be configured in terms of overriden or predefined
        preprocessor macros at compile-time.


        Some additional customization is available in the \ref RAPIDJSON_ERRORS APIs.


        \note These macros should be given on the compiler command-line
              (where applicable)  to avoid inconsistent values when compiling
              different translation units of a single application.
     */


    #include <cstdlib>  // malloc(), realloc(), free(), size_t
    #include <cstring>  // memset(), memcpy(), memmove(), memcmp()


    ///
    // RAPIDJSON_VERSION_STRING
    //
    // ALWAYS synchronize the following 3 macros with corresponding variables in /CMakeLists.txt.
    //


    //!@cond RAPIDJSON_HIDDEN_FROM_DOXYGEN
    // token stringification
    #define RAPIDJSON_STRINGIFY(x) RAPIDJSON_DO_STRINGIFY(x)
    #define RAPIDJSON_DO_STRINGIFY(x) #x
    //!@endcond


    /*! \def RAPIDJSON_MAJOR_VERSION
        \ingroup RAPIDJSON_CONFIG
        \brief Major version of RapidJSON in integer.
    */
    /*! \def RAPIDJSON_MINOR_VERSION
        \ingroup RAPIDJSON_CONFIG
        \brief Minor version of RapidJSON in integer.
    */
    /*! \def RAPIDJSON_PATCH_VERSION
        \ingroup RAPIDJSON_CONFIG
        \brief Patch version of RapidJSON in integer.
    */
    /*! \def RAPIDJSON_VERSION_STRING
        \ingroup RAPIDJSON_CONFIG
        \brief Version of RapidJSON in "<major>.<minor>.<patch>" string format.
    */
    #define RAPIDJSON_MAJOR_VERSION 1
    #define RAPIDJSON_MINOR_VERSION 1
    #define RAPIDJSON_PATCH_VERSION 0
    #define RAPIDJSON_VERSION_STRING \
        RAPIDJSON_STRINGIFY(RAPIDJSON_MAJOR_VERSION.RAPIDJSON_MINOR_VERSION.RAPIDJSON_PATCH_VERSION)


    ///
    // RAPIDJSON_NAMESPACE_(BEGIN|END)
    /*! \def RAPIDJSON_NAMESPACE
        \ingroup RAPIDJSON_CONFIG
        \brief   provide custom rapidjson namespace


        In order to avoid symbol clashes and/or "One Definition Rule" errors
        between multiple inclusions of (different versions of) RapidJSON in
        a single binary, users can customize the name of the main RapidJSON
        namespace.


        In case of a single nesting level, defining \c RAPIDJSON_NAMESPACE
        to a custom name (e.g. \c MyRapidJSON) is sufficient.  If multiple
        levels are needed, both \ref RAPIDJSON_NAMESPACE_BEGIN and \ref
        RAPIDJSON_NAMESPACE_END need to be defined as well:


        \code
        // in some .cpp file
        #define RAPIDJSON_NAMESPACE my::rapidjson
        #define RAPIDJSON_NAMESPACE_BEGIN namespace my { namespace rapidjson {
        #define RAPIDJSON_NAMESPACE_END   } }
        #include "rapidjson/..."
        \endcode


        \see rapidjson
     */
    /*! \def RAPIDJSON_NAMESPACE_BEGIN
        \ingroup RAPIDJSON_CONFIG
        \brief   provide custom rapidjson namespace (opening expression)
        \see RAPIDJSON_NAMESPACE
    */
    /*! \def RAPIDJSON_NAMESPACE_END
        \ingroup RAPIDJSON_CONFIG
        \brief   provide custom rapidjson namespace (closing expression)
        \see RAPIDJSON_NAMESPACE
    */
    #ifndef RAPIDJSON_NAMESPACE
    #define RAPIDJSON_NAMESPACE rapidjson
    #endif
    #ifndef RAPIDJSON_NAMESPACE_BEGIN
    #define RAPIDJSON_NAMESPACE_BEGIN namespace RAPIDJSON_NAMESPACE {
    #endif
    #ifndef RAPIDJSON_NAMESPACE_END
    #define RAPIDJSON_NAMESPACE_END }
    #endif


    ///
    // RAPIDJSON_HAS_STDSTRING


    #ifndef RAPIDJSON_HAS_STDSTRING
    #ifdef RAPIDJSON_DOXYGEN_RUNNING
    #define RAPIDJSON_HAS_STDSTRING 1 // force generation of documentation
    #else
    #define RAPIDJSON_HAS_STDSTRING 0 // no std::string support by default
    #endif
    /*! \def RAPIDJSON_HAS_STDSTRING
        \ingroup RAPIDJSON_CONFIG
        \brief Enable RapidJSON support for \c std::string


        By defining this preprocessor symbol to \c 1, several convenience functions for using
        \ref rapidjson::GenericValue with \c std::string are enabled, especially
        for construction and comparison.


        \hideinitializer
    */
    #endif // !defined(RAPIDJSON_HAS_STDSTRING)


    #if RAPIDJSON_HAS_STDSTRING
    #include <string>
    #endif // RAPIDJSON_HAS_STDSTRING


    ///
    // RAPIDJSON_NO_INT64DEFINE


    /*! \def RAPIDJSON_NO_INT64DEFINE
        \ingroup RAPIDJSON_CONFIG
        \brief Use external 64-bit integer types.


        RapidJSON requires the 64-bit integer types \c int64_t and  \c uint64_t types
        to be available at global scope.


        If users have their own definition, define RAPIDJSON_NO_INT64DEFINE to
        prevent RapidJSON from defining its own types.
    */
    #ifndef RAPIDJSON_NO_INT64DEFINE
    //!@cond RAPIDJSON_HIDDEN_FROM_DOXYGEN
    #if defined(_MSC_VER) && (_MSC_VER < 1800) // Visual Studio 2013
    #include "msinttypes/stdint.h"
    #include "msinttypes/inttypes.h"
    #else
    // Other compilers should have this.
    #include <stdint.h>
    #include <inttypes.h>
    #endif
    //!@endcond
    #ifdef RAPIDJSON_DOXYGEN_RUNNING
    #define RAPIDJSON_NO_INT64DEFINE
    #endif
    #endif // RAPIDJSON_NO_INT64TYPEDEF


    ///
    // RAPIDJSON_FORCEINLINE


    #ifndef RAPIDJSON_FORCEINLINE
    //!@cond RAPIDJSON_HIDDEN_FROM_DOXYGEN
    #if defined(_MSC_VER) && defined(NDEBUG)
    #define RAPIDJSON_FORCEINLINE __forceinline
    #elif defined(__GNUC__) && __GNUC__ >= 4 && defined(NDEBUG)
    #define RAPIDJSON_FORCEINLINE __attribute__((always_inline))
    #else
    #define RAPIDJSON_FORCEINLINE
    #endif
    //!@endcond
    #endif // RAPIDJSON_FORCEINLINE


    ///
    // RAPIDJSON_ENDIAN
    #define RAPIDJSON_LITTLEENDIAN  0   //!< Little endian machine
    #define RAPIDJSON_BIGENDIAN     1   //!< Big endian machine


    //! Endianness of the machine.
    /*!
        \def RAPIDJSON_ENDIAN
        \ingroup RAPIDJSON_CONFIG


        GCC 4.6 provided macro for detecting endianness of the target machine. But other
        compilers may not have this. User can define RAPIDJSON_ENDIAN to either
        \ref RAPIDJSON_LITTLEENDIAN or \ref RAPIDJSON_BIGENDIAN.


        Default detection implemented with reference to
        \li https://gcc.gnu.org/onlinedocs/gcc-4.6.0/cpp/Common-Predefined-Macros.html
        \li http://www.boost.org/doc/libs/1_42_0/boost/detail/endian.hpp
    */
    #ifndef RAPIDJSON_ENDIAN
    // Detect with GCC 4.6's macro
    #  ifdef __BYTE_ORDER__
    #    if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
    #      define RAPIDJSON_ENDIAN RAPIDJSON_LITTLEENDIAN
    #    elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
    #      define RAPIDJSON_ENDIAN RAPIDJSON_BIGENDIAN
    #    else
    #      error Unknown machine endianess detected. User needs to define RAPIDJSON_ENDIAN.
    #    endif // __BYTE_ORDER__
    // Detect with GLIBC's endian.h
    #  elif defined(__GLIBC__)
    #    include <endian.h>
    #    if (__BYTE_ORDER == __LITTLE_ENDIAN)
    #      define RAPIDJSON_ENDIAN RAPIDJSON_LITTLEENDIAN
    #    elif (__BYTE_ORDER == __BIG_ENDIAN)
    #      define RAPIDJSON_ENDIAN RAPIDJSON_BIGENDIAN
    #    else
    #      error Unknown machine endianess detected. User needs to define RAPIDJSON_ENDIAN.
    #   endif // __GLIBC__
    // Detect with _LITTLE_ENDIAN and _BIG_ENDIAN macro
    #  elif defined(_LITTLE_ENDIAN) && !defined(_BIG_ENDIAN)
    #    define RAPIDJSON_ENDIAN RAPIDJSON_LITTLEENDIAN
    #  elif defined(_BIG_ENDIAN) && !defined(_LITTLE_ENDIAN)
    #    define RAPIDJSON_ENDIAN RAPIDJSON_BIGENDIAN
    // Detect with architecture macros
    #  elif defined(__sparc) || defined(__sparc__) || defined(_POWER) || defined(__powerpc__) || defined(__ppc__) || defined(__hpux) || defined(__hppa) || defined(_MIPSEB) || defined(_POWER) || defined(__s390__)
    #    define RAPIDJSON_ENDIAN RAPIDJSON_BIGENDIAN
    #  elif defined(__i386__) || defined(__alpha__) || defined(__ia64) || defined(__ia64__) || defined(_M_IX86) || defined(_M_IA64) || defined(_M_ALPHA) || defined(__amd64) || defined(__amd64__) || defined(_M_AMD64) || defined(__x86_64) || defined(__x86_64__) || defined(_M_X64) || defined(__bfin__)
    #    define RAPIDJSON_ENDIAN RAPIDJSON_LITTLEENDIAN
    #  elif defined(_MSC_VER) && defined(_M_ARM)
    #    define RAPIDJSON_ENDIAN RAPIDJSON_LITTLEENDIAN
    #  elif defined(RAPIDJSON_DOXYGEN_RUNNING)
    #    define RAPIDJSON_ENDIAN
    #  else
    #    error Unknown machine endianess detected. User needs to define RAPIDJSON_ENDIAN.   
    #  endif
    #endif // RAPIDJSON_ENDIAN


    ///
    // RAPIDJSON_64BIT


    //! Whether using 64-bit architecture
    #ifndef RAPIDJSON_64BIT
    #if defined(__LP64__) || (defined(__x86_64__) && defined(__ILP32__)) || defined(_WIN64) || defined(__EMSCRIPTEN__)
    #define RAPIDJSON_64BIT 1
    #else
    #define RAPIDJSON_64BIT 0
    #endif
    #endif // RAPIDJSON_64BIT


    ///
    // RAPIDJSON_ALIGN


    //! Data alignment of the machine.
    /*! \ingroup RAPIDJSON_CONFIG
        \param x pointer to align


        Some machines require strict data alignment. Currently the default uses 4 bytes
        alignment on 32-bit platforms and 8 bytes alignment for 64-bit platforms.
        User can customize by defining the RAPIDJSON_ALIGN function macro.
    */
    #ifndef RAPIDJSON_ALIGN
    #if RAPIDJSON_64BIT == 1
    #define RAPIDJSON_ALIGN(x) (((x) + static_cast<uint64_t>(7u)) & ~static_cast<uint64_t>(7u))
    #else
    #define RAPIDJSON_ALIGN(x) (((x) + 3u) & ~3u)
    #endif
    #endif


    ///
    // RAPIDJSON_UINT64_C2


    //! Construct a 64-bit literal by a pair of 32-bit integer.
    /*!
        64-bit literal with or without ULL suffix is prone to compiler warnings.
        UINT64_C() is C macro which cause compilation problems.
        Use this macro to define 64-bit constants by a pair of 32-bit integer.
    */
    #ifndef RAPIDJSON_UINT64_C2
    #define RAPIDJSON_UINT64_C2(high32, low32) ((static_cast<uint64_t>(high32) << 32) | static_cast<uint64_t>(low32))
    #endif


    ///
    // RAPIDJSON_48BITPOINTER_OPTIMIZATION


    //! Use only lower 48-bit address for some pointers.
    /*!
        \ingroup RAPIDJSON_CONFIG


        This optimization uses the fact that current X86-64 architecture only implement lower 48-bit virtual address.
        The higher 16-bit can be used for storing other data.
        \c GenericValue uses this optimization to reduce its size form 24 bytes to 16 bytes in 64-bit architecture.
    */
    #ifndef RAPIDJSON_48BITPOINTER_OPTIMIZATION
    #if defined(__amd64__) || defined(__amd64) || defined(__x86_64__) || defined(__x86_64) || defined(_M_X64) || defined(_M_AMD64)
    #define RAPIDJSON_48BITPOINTER_OPTIMIZATION 1
    #else
    #define RAPIDJSON_48BITPOINTER_OPTIMIZATION 0
    #endif
    #endif // RAPIDJSON_48BITPOINTER_OPTIMIZATION


    #if RAPIDJSON_48BITPOINTER_OPTIMIZATION == 1
    #if RAPIDJSON_64BIT != 1
    #error RAPIDJSON_48BITPOINTER_OPTIMIZATION can only be set to 1 when RAPIDJSON_64BIT=1
    #endif
    #define RAPIDJSON_SETPOINTER(type, p, x) (p = reinterpret_cast<type *>((reinterpret_cast<uintptr_t>(p) & static_cast<uintptr_t>(RAPIDJSON_UINT64_C2(0xFFFF0000, 0x00000000))) | reinterpret_cast<uintptr_t>(reinterpret_cast<const void*>(x))))
    #define RAPIDJSON_GETPOINTER(type, p) (reinterpret_cast<type *>(reinterpret_cast<uintptr_t>(p) & static_cast<uintptr_t>(RAPIDJSON_UINT64_C2(0x0000FFFF, 0xFFFFFFFF))))
    #else
    #define RAPIDJSON_SETPOINTER(type, p, x) (p = (x))
    #define RAPIDJSON_GETPOINTER(type, p) (p)
    #endif


    ///
    // RAPIDJSON_SSE2/RAPIDJSON_SSE42/RAPIDJSON_SIMD


    /*! \def RAPIDJSON_SIMD
        \ingroup RAPIDJSON_CONFIG
        \brief Enable SSE2/SSE4.2 optimization.


        RapidJSON supports optimized implementations for some parsing operations
        based on the SSE2 or SSE4.2 SIMD extensions on modern Intel-compatible
        processors.


        To enable these optimizations, two different symbols can be defined;
        \code
        // Enable SSE2 optimization.
        #define RAPIDJSON_SSE2


        // Enable SSE4.2 optimization.
        #define RAPIDJSON_SSE42
        \endcode


        \c RAPIDJSON_SSE42 takes precedence, if both are defined.


        If any of these symbols is defined, RapidJSON defines the macro
        \c RAPIDJSON_SIMD to indicate the availability of the optimized code.
    */
    #if defined(RAPIDJSON_SSE2) || defined(RAPIDJSON_SSE42) \
        || defined(RAPIDJSON_DOXYGEN_RUNNING)
    #define RAPIDJSON_SIMD
    #endif


    ///
    // RAPIDJSON_NO_SIZETYPEDEFINE


    #ifndef RAPIDJSON_NO_SIZETYPEDEFINE
    /*! \def RAPIDJSON_NO_SIZETYPEDEFINE
        \ingroup RAPIDJSON_CONFIG
        \brief User-provided \c SizeType definition.


        In order to avoid using 32-bit size types for indexing strings and arrays,
        define this preprocessor symbol and provide the type rapidjson::SizeType
        before including RapidJSON:
        \code
        #define RAPIDJSON_NO_SIZETYPEDEFINE
        namespace rapidjson { typedef ::std::size_t SizeType; }
        #include "rapidjson/..."
        \endcode


        \see rapidjson::SizeType
    */
    #ifdef RAPIDJSON_DOXYGEN_RUNNING
    #define RAPIDJSON_NO_SIZETYPEDEFINE
    #endif
    RAPIDJSON_NAMESPACE_BEGIN
    //! Size type (for string lengths, array sizes, etc.)
    /*! RapidJSON uses 32-bit array/string indices even on 64-bit platforms,
        instead of using \c size_t. Users may override the SizeType by defining
        \ref RAPIDJSON_NO_SIZETYPEDEFINE.
    */
    typedef unsigned SizeType;
    RAPIDJSON_NAMESPACE_END
    #endif


    // always import std::size_t to rapidjson namespace
    RAPIDJSON_NAMESPACE_BEGIN
    using std::size_t;
    RAPIDJSON_NAMESPACE_END


    ///
    // RAPIDJSON_ASSERT


    //! Assertion.
    /*! \ingroup RAPIDJSON_CONFIG
        By default, rapidjson uses C \c assert() for internal assertions.
        User can override it by defining RAPIDJSON_ASSERT(x) macro.


        \note Parsing errors are handled and can be customized by the
              \ref RAPIDJSON_ERRORS APIs.
    */
    #ifndef RAPIDJSON_ASSERT
    #include <cassert>
    #define RAPIDJSON_ASSERT(x) assert(x)
    #endif // RAPIDJSON_ASSERT


    ///
    // RAPIDJSON_STATIC_ASSERT


    // Adopt from boost
    #ifndef RAPIDJSON_STATIC_ASSERT
    #ifndef __clang__
    //!@cond RAPIDJSON_HIDDEN_FROM_DOXYGEN
    #endif
    RAPIDJSON_NAMESPACE_BEGIN
    template <bool x> struct STATIC_ASSERTION_FAILURE;
    template <> struct STATIC_ASSERTION_FAILURE<true> { enum { value = 1 }; };
    template<int x> struct StaticAssertTest {};
    RAPIDJSON_NAMESPACE_END


    #define RAPIDJSON_JOIN(X, Y) RAPIDJSON_DO_JOIN(X, Y)
    #define RAPIDJSON_DO_JOIN(X, Y) RAPIDJSON_DO_JOIN2(X, Y)
    #define RAPIDJSON_DO_JOIN2(X, Y) X##Y


    #if defined(__GNUC__)
    #define RAPIDJSON_STATIC_ASSERT_UNUSED_ATTRIBUTE __attribute__((unused))
    #else
    #define RAPIDJSON_STATIC_ASSERT_UNUSED_ATTRIBUTE 
    #endif
    #ifndef __clang__
    //!@endcond
    #endif


    /*! \def RAPIDJSON_STATIC_ASSERT
        \brief (Internal) macro to check for conditions at compile-time
        \param x compile-time condition
        \hideinitializer
     */
    #define RAPIDJSON_STATIC_ASSERT(x) \
        typedef ::RAPIDJSON_NAMESPACE::StaticAssertTest< \
          sizeof(::RAPIDJSON_NAMESPACE::STATIC_ASSERTION_FAILURE<bool(x) >)> \
        RAPIDJSON_JOIN(StaticAssertTypedef, __LINE__) RAPIDJSON_STATIC_ASSERT_UNUSED_ATTRIBUTE
    #endif


    ///
    // RAPIDJSON_LIKELY, RAPIDJSON_UNLIKELY


    //! Compiler branching hint for expression with high probability to be true.
    /*!
        \ingroup RAPIDJSON_CONFIG
        \param x Boolean expression likely to be true.
    */
    #ifndef RAPIDJSON_LIKELY
    #if defined(__GNUC__) || defined(__clang__)
    #define RAPIDJSON_LIKELY(x) __builtin_expect(!!(x), 1)
    #else
    #define RAPIDJSON_LIKELY(x) (x)
    #endif
    #endif


    //! Compiler branching hint for expression with low probability to be true.
    /*!
        \ingroup RAPIDJSON_CONFIG
        \param x Boolean expression unlikely to be true.
    */
    #ifndef RAPIDJSON_UNLIKELY
    #if defined(__GNUC__) || defined(__clang__)
    #define RAPIDJSON_UNLIKELY(x) __builtin_expect(!!(x), 0)
    #else
    #define RAPIDJSON_UNLIKELY(x) (x)
    #endif
    #endif


    ///
    // Helpers


    //!@cond RAPIDJSON_HIDDEN_FROM_DOXYGEN


    #define RAPIDJSON_MULTILINEMACRO_BEGIN do {  
    #define RAPIDJSON_MULTILINEMACRO_END \
    } while((void)0, 0)


    // adopted from Boost
    #define RAPIDJSON_VERSION_CODE(x,y,z) \
      (((x)*100000) + ((y)*100) + (z))


    ///
    // RAPIDJSON_DIAG_PUSH/POP, RAPIDJSON_DIAG_OFF


    #if defined(__GNUC__)
    #define RAPIDJSON_GNUC \
        RAPIDJSON_VERSION_CODE(__GNUC__,__GNUC_MINOR__,__GNUC_PATCHLEVEL__)
    #endif


    #if defined(__clang__) || (defined(RAPIDJSON_GNUC) && RAPIDJSON_GNUC >= RAPIDJSON_VERSION_CODE(4,2,0))


    #define RAPIDJSON_PRAGMA(x) _Pragma(RAPIDJSON_STRINGIFY(x))
    #define RAPIDJSON_DIAG_PRAGMA(x) RAPIDJSON_PRAGMA(GCC diagnostic x)
    #define RAPIDJSON_DIAG_OFF(x) \
        RAPIDJSON_DIAG_PRAGMA(ignored RAPIDJSON_STRINGIFY(RAPIDJSON_JOIN(-W,x)))


    // push/pop support in Clang and GCC>=4.6
    #if defined(__clang__) || (defined(RAPIDJSON_GNUC) && RAPIDJSON_GNUC >= RAPIDJSON_VERSION_CODE(4,6,0))
    #define RAPIDJSON_DIAG_PUSH RAPIDJSON_DIAG_PRAGMA(push)
    #define RAPIDJSON_DIAG_POP  RAPIDJSON_DIAG_PRAGMA(pop)
    #else // GCC >= 4.2, < 4.6
    #define RAPIDJSON_DIAG_PUSH /* ignored */
    #define RAPIDJSON_DIAG_POP /* ignored */
    #endif


    #elif defined(_MSC_VER)


    // pragma (MSVC specific)
    #define RAPIDJSON_PRAGMA(x) __pragma(x)
    #define RAPIDJSON_DIAG_PRAGMA(x) RAPIDJSON_PRAGMA(warning(x))


    #define RAPIDJSON_DIAG_OFF(x) RAPIDJSON_DIAG_PRAGMA(disable: x)
    #define RAPIDJSON_DIAG_PUSH RAPIDJSON_DIAG_PRAGMA(push)
    #define RAPIDJSON_DIAG_POP  RAPIDJSON_DIAG_PRAGMA(pop)


    #else


    #define RAPIDJSON_DIAG_OFF(x) /* ignored */
    #define RAPIDJSON_DIAG_PUSH   /* ignored */
    #define RAPIDJSON_DIAG_POP    /* ignored */


    #endif // RAPIDJSON_DIAG_*


    ///
    // C++11 features


    #ifndef RAPIDJSON_HAS_CXX11_RVALUE_REFS
    #if defined(__clang__)
    #if __has_feature(cxx_rvalue_references) && \
        (defined(_LIBCPP_VERSION) || defined(__GLIBCXX__) && __GLIBCXX__ >= 20080306)
    #define RAPIDJSON_HAS_CXX11_RVALUE_REFS 1
    #else
    #define RAPIDJSON_HAS_CXX11_RVALUE_REFS 0
    #endif
    #elif (defined(RAPIDJSON_GNUC) && (RAPIDJSON_GNUC >= RAPIDJSON_VERSION_CODE(4,3,0)) && defined(__GXX_EXPERIMENTAL_CXX0X__)) || \
          (defined(_MSC_VER) && _MSC_VER >= 1600)


    #define RAPIDJSON_HAS_CXX11_RVALUE_REFS 1
    #else
    #define RAPIDJSON_HAS_CXX11_RVALUE_REFS 0
    #endif
    #endif // RAPIDJSON_HAS_CXX11_RVALUE_REFS


    #ifndef RAPIDJSON_HAS_CXX11_NOEXCEPT
    #if defined(__clang__)
    #define RAPIDJSON_HAS_CXX11_NOEXCEPT __has_feature(cxx_noexcept)
    #elif (defined(RAPIDJSON_GNUC) && (RAPIDJSON_GNUC >= RAPIDJSON_VERSION_CODE(4,6,0)) && defined(__GXX_EXPERIMENTAL_CXX0X__))
    //    (defined(_MSC_VER) && _MSC_VER >= ????) // not yet supported
    #define RAPIDJSON_HAS_CXX11_NOEXCEPT 1
    #else
    #define RAPIDJSON_HAS_CXX11_NOEXCEPT 0
    #endif
    #endif
    #if RAPIDJSON_HAS_CXX11_NOEXCEPT
    #define RAPIDJSON_NOEXCEPT noexcept
    #else
    #define RAPIDJSON_NOEXCEPT /* noexcept */
    #endif // RAPIDJSON_HAS_CXX11_NOEXCEPT


    // no automatic detection, yet
    #ifndef RAPIDJSON_HAS_CXX11_TYPETRAITS
    #define RAPIDJSON_HAS_CXX11_TYPETRAITS 0
    #endif


    #ifndef RAPIDJSON_HAS_CXX11_RANGE_FOR
    #if defined(__clang__)
    #define RAPIDJSON_HAS_CXX11_RANGE_FOR __has_feature(cxx_range_for)
    #elif (defined(RAPIDJSON_GNUC) && (RAPIDJSON_GNUC >= RAPIDJSON_VERSION_CODE(4,3,0)) && defined(__GXX_EXPERIMENTAL_CXX0X__)) || \
          (defined(_MSC_VER) && _MSC_VER >= 1700)
    #define RAPIDJSON_HAS_CXX11_RANGE_FOR 1
    #else
    #define RAPIDJSON_HAS_CXX11_RANGE_FOR 0
    #endif
    #endif // RAPIDJSON_HAS_CXX11_RANGE_FOR


    //!@endcond


    ///
    // new/delete


    #ifndef RAPIDJSON_NEW
    ///! customization point for global \c new
    #define RAPIDJSON_NEW(x) new x
    #endif
    #ifndef RAPIDJSON_DELETE
    ///! customization point for global \c delete
    #define RAPIDJSON_DELETE(x) delete x
    #endif


    ///
    // Type


    /*! \namespace rapidjson
        \brief main RapidJSON namespace
        \see RAPIDJSON_NAMESPACE
    */
    RAPIDJSON_NAMESPACE_BEGIN


    //! Type of JSON value
    enum Type {
        kNullType = 0,      //!< null
        kFalseType = 1,     //!< false
        kTrueType = 2,      //!< true
        kObjectType = 3,    //!< object
        kArrayType = 4,     //!< array 
        kStringType = 5,    //!< string
        kNumberType = 6     //!< number
    };


    RAPIDJSON_NAMESPACE_END


    #endif // RAPIDJSON_RAPIDJSON_H_
    展开全文
  • RapidJSON 是一个 C++ 的 JSON 解析器及生成器。它的灵感来自 RapidXml。 RapidJSON 小而全。它同时支持 SAX 和 DOM 风格的 API。SAX 解析器只有约 500 行代码。 RapidJSON 快。它的性能可与 strlen() 相比。可支持 ...
  • rapidjson.rar

    2020-04-28 13:11:03
    《c++》 打包rapidjson所需要的头文件包,rapidjson是一种高效的json处理器,无需lib和dll,仅包含头文件即可轻松处理json数据。
  • 使用VS2010编译工程,JsonCpp和RapidJson使用对比。
  • rapidjson 简单封装

    2020-01-31 05:00:19
    基于开源json库 rapidjson 的一层简单封装,比直接调用原生库要方便很多。 基于开源json库 rapidjson 的一层简单封装,比直接调用原生库要方便很多。
  • rapidjson处理库

    2017-05-31 16:07:12
    rapidjson处理库,只需要包含头文件到项目中就可实现调用。
  • rapidjson的最新官方中文开发文档,彩色pdf格式,清晰简洁
  • C++使用rapidjson库,只要包含头文件,就可以解析json文件,修改json文件,使用方便。
  • rapidjson将嵌套map转为嵌套json——人生苦短,我用rapidjson 看代码: #include #include // 请自己下载开源的rapidjson #include rapidjson/prettywriter.h #include rapidjson/rapidjson.h #include rapidjson...
  • rapidjson解析json代码实例 直接看代码: #include #include #include #include #include #include #include // 请自己下载开源的rapidjson #include "rapidjson/prettywriter.h" #include "rapidjson/...
  • rapidjson-超强JSON文件读取解析库(带打包和解析实例),支持各种文件编码,推荐使用 效率比jsoncpp好,推荐大家使用
  • 腾讯很高兴通过提供RapidJSON来支持开源社区。 版权所有(C)2015 THL A29 Limited(一家腾讯公司)和Milo Yip。 RapidJSON文档 带有可下载的PDF / EPUB / MOBI的 ,未提供API参考。 建造状态 介绍 RapidJSON是C +...
  • 代码基于RapidJson v1.1 (2016-8-25)。 代码示例是本人项目中用到的解析和创建嵌套json文本格式的C++代码,已用于项目中。 RapidJson是一套非常优秀的C++ JSON解析创建框架,可以通过本demo入门。
  • rapidjson组装继续简化——人生苦短,我用rapidjson 看最简单的: #include #include #include #include #include #include #include // 请自己下载开源的rapidjson #include rapidjson/prettywriter.h #...

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 3,133
精华内容 1,253
关键字:

rapidjson