JSON.stringify only where needed