Skip to content

Commit 99f2e88

Browse files
committed
💡 update README to include comma_compact_nulls option details
1 parent 7bf9aa5 commit 99f2e88

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

README.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -582,6 +582,9 @@ format of the output ``list``:
582582
`COMMA <https://techouse.github.io/qs_codec/qs_codec.models.html#qs_codec.enums.list_format.ListFormat.COMMA>`_, you can also pass the
583583
`comma_round_trip <https://techouse.github.io/qs_codec/qs_codec.models.html#qs_codec.models.encode_options.EncodeOptions.comma_round_trip>`__ option set to ``True`` or
584584
``False``, to append ``[]`` on single-item ``list``\ s, so that they can round trip through a decoding.
585+
Set the `comma_compact_nulls <https://techouse.github.io/qs_codec/qs_codec.models.html#qs_codec.models.encode_options.EncodeOptions.comma_compact_nulls>`__ option to ``True`` with the same
586+
format when you'd like to drop ``None`` entries instead of keeping empty slots (e.g. ``[True, False, None, True]`` becomes
587+
``true,false,true``).
585588

586589
`BRACKETS <https://techouse.github.io/qs_codec/qs_codec.models.html#qs_codec.enums.list_format.ListFormat.BRACKETS>`__ notation is used for encoding ``dict``\s by default:
587590

docs/README.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -538,6 +538,9 @@ format of the output ``list``:
538538
:py:attr:`COMMA <qs_codec.enums.list_format.ListFormat.COMMA>`, you can also pass the
539539
:py:attr:`comma_round_trip <qs_codec.models.encode_options.EncodeOptions.comma_round_trip>` option set to ``True`` or
540540
``False``, to append ``[]`` on single-item ``list``\ s so they can round-trip through a decoding.
541+
Set :py:attr:`comma_compact_nulls <qs_codec.models.encode_options.EncodeOptions.comma_compact_nulls>` to ``True`` with the same
542+
format when you'd like to drop ``None`` entries instead of keeping empty slots (e.g.
543+
``[True, False, None, True]`` becomes ``true,false,true``).
541544

542545
:py:attr:`BRACKETS <qs_codec.enums.list_format.ListFormat.BRACKETS>` notation is used for encoding ``dict``\s by default:
543546

0 commit comments

Comments
 (0)