Fixed data saving for JSON.