Skip to content

Commit 434411a

Browse files
committed
Merge branch '4.4' into 5.1
* 4.4: [Serializer] Clarifies 'csv_headers' option
2 parents 8b8fa8a + ab238c7 commit 434411a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

components/serializer.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -816,7 +816,10 @@ Option Description De
816816
``csv_escape_char`` Sets the escape character (at most one character)
817817
``csv_key_separator`` Sets the separator for array's keys during its ``.``
818818
flattening
819-
``csv_headers`` Sets the headers for the data ``[]``, inferred from input data's keys
819+
``csv_headers`` Sets the order of the header and data columns
820+
E.g.: ``serialize(['c' => 3,'a' => 1,'b' => 2],
821+
'csv', ['csv_headers' => ['a', 'b', 'c']]);``
822+
returns ``a,b,c\n1,2,3 `` ``[]``, inferred from input data's keys
820823
``csv_escape_formulas`` Escapes fields containg formulas by prepending them ``false``
821824
with a ``\t`` character
822825
``as_collection`` Always returns results as a collection, even if only

0 commit comments

Comments
 (0)