Use JSON.generate when truncating, too