File tree Expand file tree Collapse file tree 2 files changed +32
-0
lines changed
Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ indent_style = space
1111indent_size = 4
1212
1313[* .md ]
14+ indent_size = 2
1415trim_trailing_whitespace = false
1516
1617[* .yml ]
Original file line number Diff line number Diff line change @@ -39,4 +39,35 @@ Serializer::serializeList(iterable): string;
3939Serializer::serializeDictionary(object): string;
4040```
4141
42+ ### Special Types
43+ ` Serializer ` will accept ` string ` or any ` Stringable ` object as an Item value,
44+ but will throw a ` SerializeException ` if it contains any characters outside the
45+ printable ASCII range.
46+
47+ Special Item types that should not be encoded as strings must be differentiated
48+ by using a decorating class:
49+
50+ - ** Byte Sequences** (` \gapple\StructuredFields\Bytes ` )
51+ A string containing binary data.
52+
53+ ` Serializer ` and ` Parser ` handle base64 encoding and decoding the provided string.
54+
55+
56+ - ** Display Strings** (` \gapple\StructuredFields\DisplayString ` )
57+ A string that includes Unicode characters.
58+
59+ ` Serializer ` and ` Parser ` handle percent-encoding and decoding non-ascii characters.
60+
61+
62+ - ** Tokens** (` \gapple\StructuredFields\Token ` )
63+ A short textual word with a restricted character set.
64+
65+
66+ - ** Dates** (` \gapple\StructuredFields\Date ` )
67+ An integer timestamp
68+
69+ ` Serializer ` accepts any object that implements ` \DateTimeInterface ` .
70+ ` Parser ` will return a ` \gapple\StructuredFields\Date ` object.
71+
72+
4273[ 1 ] : https://www.rfc-editor.org/rfc/rfc9651.html
You can’t perform that action at this time.
0 commit comments