on master help sign in
Let's see if this works
commit31bf6437fbf4b9f92e9cd338f257b5a07e75754a authorBryan O'Sullivan <bos@serpentine.com> dateWed 22 Jul 2015, 13:57 (11 years ago) parent7c6a65c
1 file changed+9−4
changelog.md+9−4
changelog.md+9−4
@@ -27,7 +27,7 @@ into upgrade problems, please file an issue with details.
2727
2828* The `ToJSON` class has a new method, `toEncoding`, that allows
2929 direct encoding from a Haskell value to a lazy bytestring without
30− construction of an intermediate Value.
30+ construction of an intermediate `Value`.
3131
3232 The performance benefits of direct encoding are significant: more
3333 than 2x faster than before, with less than 1/3 the memory usage.
@@ -35,7 +35,12 @@ into upgrade problems, please file an issue with details.
3535 To preserve API compatibility across upgrades from older versions of
3636 this library, the default implementation of `toEncoding` uses
3737 `toJSON`. You will *not* see any performance improvement unless you
38− write an implementation of toEncoding.
38+ write an implementation of `toEncoding`, which can be very simple:
39+
40+ ```haskell
41+ instance ToJSON Coord where
42+ toEncoding = 'genericToEncoding' 'defaultOptions'
43+ ```
3944
4045 (Behind the scenes, the `encode` function uses `toEncoding` now, so
4146 if you implement `toEncoding` for your types, you should see a
@@ -163,9 +168,9 @@ into upgrade problems, please file an issue with details.
163168 * The `Fixed` class
164169 * ISO-8601 dates: `UTCTime`, `ZonedTime`, and `TimeZone`
165170
166−* Added accessor functions for inspecting Values.
171+* Added accessor functions for inspecting `Value`s.
167172
168−* Added eitherDecode function that returns an error message if
173+* Added `eitherDecode` function that returns an error message if
169174 decoding fails.
170175
171176# 0.5 to 0.6