Skip to content

Commit

Permalink
picojson
Browse files Browse the repository at this point in the history
  • Loading branch information
memsharded committed Sep 12, 2019
1 parent a115df4 commit 74e25e2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pico_json/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
conanfile.py
test_package/*
16 changes: 16 additions & 0 deletions pico_json/example.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#include "picojson/picojson.h"

int main(void) {

const char* json = "{\"a\":1}";
picojson::value v;
std::string err;
const char* json_end = picojson::parse(v, json, json + strlen(json), &err);
if (! err.empty()) {
std::cerr << err << std::endl;
}
std::cout << "Json parsed ok!" << std::endl;

return 0;
}

0 comments on commit 74e25e2

Please sign in to comment.