Skip to content

SeverinDenisenko/json

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JSON for C++23

Dependencies

No external Dependencies!

Adding to your project

add_subdirectory(json)
include_directories(json/include)

Creation

Json json = JsonObject();

json["hello"] = 123.0;
json["json"] = true;
json["for"] = "modern C++";

json["nested"] = JsonObject();
json["nested"]["objects"] = JsonArray();
json["nested"]["objects"].push_back(JsonObject());
json["nested"]["objects"][0] = "and arrays";

Output

Writer writer("output.json");
writer.Write(json);

Input

Parser parser("input.json");
Json json = parser.Parse();

About

My json for C++ 23

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages