[#8] ensure null termination for json string