Skip to content

Commit

Permalink
Add changelog about decodeStrictText
Browse files Browse the repository at this point in the history
  • Loading branch information
phadej committed Oct 3, 2023
1 parent b438e32 commit 704a403
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@ For the latest version of this document, please see [https://github.com/haskell/

* Add `Data.Aeson.RFC8785`, a JSON Canonicalization Scheme implementation
https://datatracker.ietf.org/doc/html/rfc8785
* Add Data.Aeson.Decoding.Text, decodeStrictText :: Text -> ...

We avoid intermediate `ByteString` copy by not doing
`decode . TE.encodeUtf8`, but instead working on `Text` value directly.
As we know that the stream is valid Unicode (UTF8 or UTF16),
we can also take some shortcuts.

One gotcha is that internal `Text` values (in `Key`s or `Value` `String`s)
will most likely retain the original input `Text` value (its underlying `Array`).
It shouldn't be an issue if the `Value` is then decoded to something else so these
`Text` values disapper, but if not (e.g. `Object` keys survive)
then users might want to use `Data.Text.copy`.

### 2.2.0.0

Expand Down

0 comments on commit 704a403

Please sign in to comment.