I'm trying to parse Json file and store the data into 2D array or vector. The Json file looks like this:
{"n" : 2,
"x" : [[1,2],
[0,4]]}
And this is what my code looks like and but I keep getting "json.exception.parse_error.101" error
#include <iostream>
#include "json.hpp"
#include <fstream>
using json = nlohmann::json;
using namespace std;
int main(int argc, const char * argv[]) {
ifstream i("trivial.json");
json j;
i >> j;
return 0;
}