[0.1.6] Fix trailing NULL character in JSON output