2.3 deal with the problem of generating wrong json

Also provide comand line execution