Last active
October 5, 2017 14:29
-
-
Save hugoledoux/c8668e137438a993fb39978a413b0160 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <fstream> | |
#include "json.hpp" | |
using json = nlohmann::json; | |
int main(int argc, const char * argv[]) { | |
std::ifstream input("/Users/hugo/projects/cityjson/example-datasets/dummy-values/example.json"); | |
json j; | |
input >> j; | |
//-- CityJSON version | |
std::cout << "CityJSON version: " << j["metadata"]["crs"]["epsg"] << std::endl; | |
//-- access with JSON pointers | |
std::cout << "CityJSON version: " << j["/metadata/crs/epsg"_json_pointer] << std::endl; | |
return 1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment