GithubHelp home page GithubHelp logo

ajson's Issues

utf8-bom file check fail

warning: result of comparison of constant 239 with expression of type 'char' is always false [-Wtautological-constant-out-of-range-compare]
if (buffer[0] == 0xEF && buffer[1] == 0xBB && buffer[2] == 0xBF)

如何添加支持其他容器?

为了支持tsl::robin_map, 在ajson.hpp的158行,添加is_template_instant_of<tsl::robin_map, T>::value ||
编译报错:

src/ajson/ajson.hpp:158:47: error: type/value mismatch at argument 1 in template parameter list for ‘template<template<class ...> class U, class T> struct ajson::detail::is_template_instant_of’
  158 |       is_template_instant_of<tsl::robin_map, T>::value ||
      |                                               ^
src/ajson/ajson.hpp:158:47: note:   expected a template of type ‘template<class ...> class U’, got ‘template<class Key, class T, class Hash, class KeyEqual, class Allocator, bool StoreHash, class GrowthPolicy> class tsl::robin_map’

似乎是is_template_instant_of不支持模板里有非类型模板参数, 怎么办?

最近在QT里面用了下该程序

release 崩溃,debug正常;
修改release下的makefile.release文件,去掉优化 也正常;
使用的是mingw 64-bit编译器。
另外出问题的只是结构体转json的功能,其它没测。该结构体只有int、double、string(非QString)类型。
示例中给出的
string_stream ss;
save_to(ss,obj);
经过我测试,使用std::stringstream,在release下程序不崩溃。

请问, boost::ajson 报错,说 "boost"不明确 是怎么回事?

请问, boost::ajson 报错,说 "boost"不明确 是怎么回事?

VS2013, 配置了boost, rapidjson也有.

错误 3 error C2440: “=”: 无法从“rapidjson::GenericMemberIterator<false,Encoding,Allocator>”转换为“rapidjson::GenericMember<Encoding,Allocator> *” c:\users\administrator\documents\visual studio 2013\projects\outsourcing.solutions\55likemw\cxtrademw\cxtradespiimpl.cpp 16 1 CXTradeMW

5 IntelliSense: "boost" 不明确 c:\Users\Administrator\Documents\Visual Studio 2013\Projects\Outsourcing.Solutions\55LikeMW\CXTradeMW\CXTradeSpiImpl.cpp 12 17 CXTradeMW

6   IntelliSense:  不存在从 "rapidjson::GenericMemberIterator<false, rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>" 到 "rapidjson::GenericMember<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>> *" 的适当转换函数    c:\Users\Administrator\Documents\Visual Studio 2013\Projects\Outsourcing.Solutions\55LikeMW\CXTradeMW\CXTradeSpiImpl.cpp    16  1   CXTradeMW

split_fields error

测试代码:
int main() { const char* json = "{ \"Name\" : \"Boo\", \"Age\" : 28}"; field_list list = split_fields(json); for (auto it: list) { char arr[20] = {0}; std::memcpy(arr, it.str, it.len); printf("char* %s\n", arr); } return 0; }
测试结果:
char* { char* Name" char* "Boo" char* "Age" char* 28}
问题:
Name中,没有包含开始的"

判断一个类型是否具有emplace_back方法的正确姿势

`template<typename T, typename = void>
struct has_emplace_back : std::false_type {};

template
struct has_emplace_back <T, decltype(std::declval().emplace_back(), void())> : std::true_type {};`

替换你那个is_emplace_back_able数值型元函数可好?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.