Skip to content

Basic usage

gchudnov edited this page Oct 17, 2014 · 6 revisions

Read JSON:

#include <string>
#include <iostream>
#include "cpp-json-qi/json.h"

  std::string input("...")
  std::istringstream iss(input);
  json_value val;
  iss >> val;

Write JSON:

#include <string>
#include <iostream>
#include "cpp-json-qi/json.h"

  json_value val;
  std::ostringstream oss;
  oss << json_value(val);

Clone this wiki locally