Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ which encodes most non-alphanumeric characters.
to dot-path format and then serializes the values as above, e.g.,
`{ foo: 'a', bar: { baz: 'b', fizz: [1, 2] } }` serializes to
`foo=a&bar.baz=b&bar.fizz=1&bar.fizz=2`.
- Empty objects are serialized to `undefined`, e.g.,
`{ foo: {}, bar: { baz: {} }, fizz: 1 }` serializes to `fizz=1`.
- Serialization of keys containing a `.`
is not supported and will throw an `UnserializableParamError`.
- Serialization of nested arrays or objects nested inside arrays
Expand All @@ -67,6 +69,10 @@ which encodes most non-alphanumeric characters.
- Serialization of `NaN`, `Infinity`, and `-Infinity`
is not supported and will throw an `UnserializableParamError`.

#### Why is the empty string and empty object parsed as undefined but not the empty array?

TODO

### Compatible parsing strategy

Serialization is guaranteed to be well-defined within each type, i.e.,
Expand All @@ -82,7 +88,7 @@ the consumer parsing the string, it can be unambigously parsed back to the origi
##### Primitive

- `string | null`.
- Excludes zero-length strings.
- Excludes zero-length strings or treats them incidentally as `undefined`.
- `number | null`.
- `bigint | null`.
- `boolean | null`.
Expand Down