Accepting request 352165 from devel:languages:haskell
- update to 0.10.0.0 * Performance improvements: + Direct encoding via the new toEncoding method is over 2x faster than toJSON. (You must write or code-gen a toEncoding implementation to unlock this speedup. See below for details.) + Improved string decoding gives a 12% speed win in parsing string-heavy JSON payloads (very common). + Encoding and decoding of time-related types are 10x faster (!!) as a result of bypassing Data.Time.Format and the arbitrary-precision Integer type. + When using toEncoding, [Char] can be encoded without a conversion to Text. This is fast and efficient. + Parsing into an Object is now 5% faster and more allocation-efficient. * SUBTLE API CHANGES, READ CAREFULLY: + With the exception of long-deprecated code, the API changes below should be upwards compatible from older versions of aeson. If you run into upgrade problems, please file an issue with details. + The ToJSON class has a new method, toEncoding, that allows direct encoding from a Haskell value to a lazy bytestring without construction of an intermediate Value. + The performance benefits of direct encoding are significant: more than 2x faster than before, with less than 1/3 the memory usage. + To preserve API compatibility across upgrades from older versions of this library, the default implementation of toEncoding uses toJSON. You will not see any performance improvement unless you write an implementation of toEncoding, which can be very simple: instance ToJSON Coord where toEncoding = genericToEncoding defaultOptions (Behind the scenes, the encode function uses toEncoding now, so if you implement toEncoding for your types, you should see a speedup immediately.) + If you use Template Haskell or GHC Generics to auto-generate your ToJSON (forwarded request 352123 from mimi_vx) OBS-URL: https://build.opensuse.org/request/show/352165 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ghc-aeson?expand=0&rev=6
This commit is contained in:
commit
598637a9c8
3
aeson-0.10.0.0.tar.gz
Normal file
3
aeson-0.10.0.0.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3fefae24f68fcb47371e8b13664b47f7343e00b21d65efeb6824efe8f21877a6
|
||||
size 205847
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0707588dfb5fdfe787eba5b3d5a9950acb224a8dae9dcdcfc9c974ae2b6788d5
|
||||
size 143850
|
@ -1,3 +1,77 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Dec 23 15:40:06 UTC 2015 - mimi.vx@gmail.com
|
||||
|
||||
- update to 0.10.0.0
|
||||
* Performance improvements:
|
||||
+ Direct encoding via the new toEncoding method is over 2x faster than toJSON.
|
||||
(You must write or code-gen a toEncoding implementation to unlock this speedup.
|
||||
See below for details.)
|
||||
+ Improved string decoding gives a 12% speed win in parsing string-heavy JSON
|
||||
payloads (very common).
|
||||
+ Encoding and decoding of time-related types are 10x faster (!!) as a result of
|
||||
bypassing Data.Time.Format and the arbitrary-precision Integer type.
|
||||
+ When using toEncoding, [Char] can be encoded without a conversion to Text.
|
||||
This is fast and efficient.
|
||||
+ Parsing into an Object is now 5% faster and more allocation-efficient.
|
||||
* SUBTLE API CHANGES, READ CAREFULLY:
|
||||
+ With the exception of long-deprecated code, the API changes below should be
|
||||
upwards compatible from older versions of aeson. If you run into upgrade
|
||||
problems, please file an issue with details.
|
||||
+ The ToJSON class has a new method, toEncoding, that allows direct encoding
|
||||
from a Haskell value to a lazy bytestring without construction of an
|
||||
intermediate Value.
|
||||
+ The performance benefits of direct encoding are significant: more than 2x
|
||||
faster than before, with less than 1/3 the memory usage.
|
||||
+ To preserve API compatibility across upgrades from older versions of this
|
||||
library, the default implementation of toEncoding uses toJSON. You will not
|
||||
see any performance improvement unless you write an implementation of
|
||||
toEncoding, which can be very simple:
|
||||
instance ToJSON Coord where
|
||||
toEncoding = genericToEncoding defaultOptions
|
||||
(Behind the scenes, the encode function uses toEncoding now, so if you
|
||||
implement toEncoding for your types, you should see a speedup immediately.)
|
||||
+ If you use Template Haskell or GHC Generics to auto-generate your ToJSON
|
||||
instances, you'll benefit from fast toEncoding implementations for free!
|
||||
+ When converting from a Value to a target Haskell type, FromJSON instances now
|
||||
provide much better error messages, including a complete JSON path from the
|
||||
root of the object to the offending element. This greatly eases debugging.
|
||||
+ It is now possible to use Template Haskell to generate FromJSON and ToJSON
|
||||
instances for types in data families.
|
||||
+ If you use Template Haskell or generics, and used to use the camelTo function
|
||||
to rename fields, the new camelTo2 function is smarter. For example, camelTo
|
||||
will rename CamelAPICase to camelapi_case (ugh!), while camelTo2 will map
|
||||
it to camel_api_case (yay!).
|
||||
+ New ToJSON and FromJSON instances for the following time-related types: Day,
|
||||
LocalTime.
|
||||
+ The Result type is now an instance of Foldable and Traversable.
|
||||
+ The Data.Aeson.Generic module has been removed. It was deprecated in late 2013.
|
||||
+ The instance of Monad for the Result type lacked an implementation of fail
|
||||
(oops). This has been corrected.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Sep 28 18:42:15 UTC 2015 - mimi.vx@gmail.com
|
||||
|
||||
- update to 0.9.0.1
|
||||
* A stray export of encodeToBuilder got away!
|
||||
* The json and json' parsers are now synonyms for value and value', in conformance
|
||||
with the looser semantics of RFC 7159.
|
||||
* Renamed encodeToByteStringBuilder to the more compact encodeToBuilder.
|
||||
* The dependency on the unordered-containers package was too lax, and has been
|
||||
corrected.
|
||||
* Encoding a Scientific value with a huge exponent is now handled efficiently.
|
||||
(This would previously allocate a huge arbitrary-precision integer, potentially
|
||||
leading to a denial of service.)
|
||||
* Handling of strings that contain backslash escape sequences is greatly improved.
|
||||
For a pathological string containing almost a megabyte of consecutive backslashes,
|
||||
the new implementation is 27x faster and uses 42x less memory.
|
||||
* The ToJSON instance for UTCTime is rendered with higher (picosecond) resolution.
|
||||
* The value parser now correctly handles leading whitespace.
|
||||
* New instances of ToJSON and FromJSON for Data.Sequence and Data.Functor.Identity.
|
||||
The Value type now has a Read instance.
|
||||
* ZonedTime parser ordering now favours the standard JSON format, increasing
|
||||
efficiency in the common case.
|
||||
* Encoding to a Text.Builder now escapes '<' and '>' characters, to reduce XSS risk.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 22 10:47:20 UTC 2015 - mimi.vx@gmail.com
|
||||
|
||||
|
@ -20,8 +20,8 @@
|
||||
|
||||
%bcond_with tests
|
||||
|
||||
Name: ghc-%{pkg_name}
|
||||
Version: 0.8.0.2
|
||||
Name: ghc-aeson
|
||||
Version: 0.10.0.0
|
||||
Release: 0
|
||||
Summary: Fast JSON parsing and encoding
|
||||
License: BSD-3-Clause
|
||||
@ -41,7 +41,6 @@ BuildRequires: ghc-deepseq-devel
|
||||
BuildRequires: ghc-dlist-devel
|
||||
BuildRequires: ghc-hashable-devel
|
||||
BuildRequires: ghc-mtl-devel
|
||||
BuildRequires: ghc-old-locale-devel
|
||||
BuildRequires: ghc-scientific-devel
|
||||
BuildRequires: ghc-syb-devel
|
||||
BuildRequires: ghc-template-haskell-devel
|
||||
|
Loading…
Reference in New Issue
Block a user