Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

nlhoman json load from file

// read a JSON file
// Get json object through file stream
std::ifstream i("file.json");
json j;
i >> j;

// write prettified JSON to another file
// Write the nice of the json object to the file
std::ofstream o("pretty.json");
o << std::setw(4) << j << std::endl;
Source by programmer.group #
 
PREVIOUS NEXT
Tagged: #nlhoman #json #load #file
ADD COMMENT
Topic
Name
9+3 =