fix a bug for json output
added json loading function