attributes['value'] = is_array($value) ? json_encode($value) : (string) $value; } }