Split between generating json and using json. Remove gl and other unnecessary code.
call saveJson() to save json to file
add sample json files, with indentations removed