wrap render part as toJson function
using argv as json file name