jsoncpp

    0热度

    1回答

    我对C++非常陌生,我试图用jsoncpp来获取数组中的天气。 JSON字符串看起来是这样的: {"coord":{"lon":139,"lat":35}, "sys":{"country":"JP","sunrise":1369769524,"sunset":1369821049}, "weather":[{"id":804,"main":"clouds","description":"ov

    0热度

    1回答

    我想使用CMake来建立一个使用JSONCpp的项目。我想下载JSONCpp,在本地编译并链接到它。项目结构具有用于第三方目录的CMake文件在单独的位置。我得到两个错误。 CMake进程尝试全局安装文件,而我无法识别CMake变量以设置为在本地安装或不安装它。 当我运行make时,即使我尝试将所有变量设置为正确的方向,链接程序也找不到libjsoncpp。 有谁知道如何关闭全局安装的尝试?如何以

    0热度

    1回答

    我有yahoo finance json文件,我希望从quote列表中分离日期,关闭和音量,并使用逗号分隔符将其保存在单个文本文件中。这是我的json脚本。 Json::Value root; // will contains the root value after parsing. Json::Reader reader; bool parsingSuccessful = reader.p

    0热度

    1回答

    我能够使用JsonCPP(https://github.com/open-source-parsers/jsoncpp)创建测试WinApp来解析json文件。 然而,当我实现了与C/C++的MFC C++项目相似 - >预编译头选项设置为使用预编译头(/羽)在VS2008时,出现此错误: c:\users\user1\documents\visual studio 2008\projects\j

    0热度

    1回答

    我想使用Jsoncpp创建Json消息。 我做了如下: g++ -o clients clients.cpp -ljsoncpp -lzmq 这个误差发生种类: clients.cpp:(.text._ZN20multi_usrp_emulation7client1Ev[_ZN20multi_usrp_emulation7client1Ev ]+0x1d9): undefined refere

    -2热度

    1回答

    我试图在使用jsoncpp做一些类似的操作,该函数将json值作为字符串返回。 std::string some_function(std::string val){ . . . if(val=="date") { Json::Value my=root["data"]["date"]; std::cout<<"Date"; } else if(val=="id"

    0热度

    1回答

    刚刚接触cpp,但根据项目需求,我需要使用rest api并解析响应。 能够调用API &捕获响应,但无法使用JSONCPP库进行解析。 这些都是我也跟着解析JSON步骤: 使用此命令在Ubuntu安装libjsoncpp 命令和apt-get安装libjsoncpp-dev的 下载JSON源文件和复制的JSON头文件到项目文件夹 编译CPP使用此命令 的gcc -o test.out TEST.

    0热度

    1回答

    我使用rest-framework模块在Django中创建了REST端点;简单的代码放在如下: models.py class Data(models.Model): name = models.CharField(max_length=256) description = models.TextField() def __str__(self): re

    0热度

    1回答

    我想从我的MongoDB实例中检索出一个对象。我正在使用JsonCPP库。 目前,我在做什么是: system(("mongo --host " + host_name + " --port " + std::to_string(port) + " " + database_name + " --eval 'db." + collection_name + ".find({},{_id:0})'

    1热度

    1回答

    当我运行下面的代码: #include <cstdio> #include <iostream> #include <fstream> #include <cstring> #include <C:\Users\User\Documents\jsoncpp-master\dist\json\json.h> #include <C:\Users\User\Documents\jsoncpp