Fix a bug in JsonHelper about autofree.