lefticus / json2cpp

Compiles JSON into static constexpr C++ data structures with nlohmann::json API
MIT License
259 stars 16 forks source link

Segmentation fault when using incorrect CLI arguments #16

Open aminya opened 7 months ago

aminya commented 7 months ago

I tried to use the CLI via these arguments as I didn't know what the expected inputs because of lack of an example or docs are.

./json2cpp test ./test.json ./test.cpp

It seems the third argument is incorrect as it should be a name. The arguments need to be validated to prevent segmentation faults. Also, it would be useful to have more documentation.

The correct way to use the CLI is

./json2cpp test ./test.json test