Skip to content

Commit f46e4e2

Browse files
committed
Merge branch '5.2' into 5.x
* 5.2: [Serializer] Clarifies 'csv_headers' option
2 parents 2fe4181 + 850f022 commit f46e4e2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

components/serializer.rst

+4-1
Original file line numberDiff line numberDiff line change
@@ -897,7 +897,10 @@ Option Description De
897897
``csv_escape_char`` Sets the escape character (at most one character)
898898
``csv_key_separator`` Sets the separator for array's keys during its ``.``
899899
flattening
900-
``csv_headers`` Sets the headers for the data ``[]``, inferred from input data's keys
900+
``csv_headers`` Sets the order of the header and data columns
901+
E.g.: ``serialize(['c' => 3,'a' => 1,'b' => 2],
902+
'csv', ['csv_headers' => ['a', 'b', 'c']]);``
903+
returns ``a,b,c\n1,2,3 `` ``[]``, inferred from input data's keys
901904
``csv_escape_formulas`` Escapes fields containg formulas by prepending them ``false``
902905
with a ``\t`` character
903906
``as_collection`` Always returns results as a collection, even if only

0 commit comments

Comments
 (0)