add main-json.cpp and an example of simple input file