Watch 1 Star 2 Fork 1

魔凤啸天 / MFJSONC++MIT

Join us
Explore and code with more than 5 million developers,Free private repositories !:)
Sign up
基于c++标准库实现的轻量级json解析引擎(不支持字符串u8转义) spread retract

Clone or download
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README.md

MFJSON

Description

基于c++标准库实现的轻量级json解析引擎(不支持字符串u8转义)

windows下请#include<string>

使用接口

    MFObject *m=LoadJSON((char*)"test.json");//从文件读
    //m=LoadJSON("{}");从字符串读
    //m=MFObject::Empty();//创建空对象
    m->AddAttr("蜗牛","222");
    m->GetAttr("蜗牛")->Print();
    m->SetAttr("蜗牛","是250");
    m->GetAttr("蜗牛")->Print();
    m->SetAttr("蜗牛",233);
    m->GetAttr("蜗牛")->Print();
    m->SetAttr("蜗牛",2.33);
    m->GetAttr("蜗牛")->Print();
    m->SetAttr("蜗牛");
    m->GetAttr("蜗牛")->Print();

获取对应C++值

        long Int()
        double Float()
        std::vector<MFObject*>* Array()
        const std::string* String()
        std::unordered_map<std::string,MFObject*>* Object()

Comments ( 2 )

Sign in for post a comment

C++
1
https://gitee.com/mfxt/MFJSON.git
git@gitee.com:mfxt/MFJSON.git
mfxt
MFJSON
MFJSON
master

Help Search