get input and parse json
merge main.cpp