10000 GitHub - qwix456/jsonh: JSON Library
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

qwix456/jsonh

Folders and files

< 8510 tr class="Table-module__Box_2--kJgvd">
NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 

Repository files navigation

jsonh

My C++ JSON library

Example code

#include <iostream>
#include "jsonh.hpp"

int main()
{
	jsonh::Object obj;
	obj.set("name", new jsonh::String("John"));
	obj.set("age", new jsonh::Number(30));
	obj.set("isStudent", new jsonh::Boolean(false));

    std::ofstream outputFile("output.json");
    if (outputFile.is_open()) {
        outputFile << obj.indent(5); // Indentation
        outputFile.close();
        std::cout << "JSON saved in 'output.json' file'" << std::endl;
    }
    else {
        std::cerr << "Failed to open file for writing." << std::endl;
    }
}

About

JSON Library

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0