Releases: postmates/PMJSON
Releases · postmates/PMJSON
PMJSON v2.0.0
- Add full support for decimal numbers (on supported platforms). This takes the form of a new
JSON
variant.decimal
, any relevant accessors, and full parsing/decoding support with the new option.useDecimals
. With this option, any number that would have been decoded as aDouble
will be decoded as aDecimal
instead. - Add a set of
forEach
accessors for working with arrays, similar to the existingmap
andflatMap
accessors.
PMJSON v1.2.1
- Handle UTF-32 input.
- Detect UTF-16 and UTF-32 input without a BOM.
- Fix bug where we weren't passing decoder options through for UTF-16 input.
PMJSON v1.2.0
- Change how options are provided to the encoder/decoder/parser. All options are now provided in the form of a struct that uses array literal syntax (similar to
OptionSet
s). The old methods that take strict/pretty flags are now marked as deprecated. - Add a new depth limit option to the decoder, with a default of 10,000.
- Implement a new test suite based on JSONTestSuite.
- Fix a crash if the input stream contained a lone trail surrogate without a lead surrogate.
- Fix incorrect parsing of numbers of the form
1e-1
or1e+1
. - When the
strict
option is specified, stop accepting numbers of the form01
or-01
. - Add support for UTF-16 when decoding a
Data
that has a UTF-16 BOM. - Skip a UTF-8 BOM if present when decoding a
Data
.
PMJSON v1.1.0
- Full JSON stream support.
JSONParser
andJSONDecoder
can now both operate in streaming mode, a new typeJSONStreamDecoder
was added as a lazy sequence of JSON values, and a convenience methodJSON.decodeStream(_:)
was added. - Add support for pattern matching with
JSONParserError
. It should now work just like any other error, allowing you to say e.g.if case JSONParserError.invalidSyntax = error { … }
.* AddHashable
toJSONEvent
andJSONParserError
. - Make
JSONParserError
conform toCustomNSError
for better Obj-C errors. - Rename
JSONEventGenerator
toJSONEventIterator
andJSONParserGenerator
toJSONParserIterator
. The old names are available (but deprecated) for backwards compatibility.
PMJSON V1.0.1
This release fixes CocoaPods support, and also improves compile times slightly.
PMJSON v1.0.0
This release supports Swift 3.
PMJSON v0.9.4
This release supports Swift 2.3, in addition to the following changes:
- Add setters for basic accessors so you can write code like
json["foo"].object?["key"] = "bar"
. - Add optional
NSError
userInfo provider forJSONError
. Setting this up requires callingJSONError.registerNSErrorUserInfoProvider()
.
PMJSON v0.9.3
- Add new set of convenience
JSON
initializers. - Change
description
anddebugDescription
forJSON
andJSONObject
to be more useful.
description
is now the JSON-encoded string. - Implement
CustomReflectable
forJSON
andJSONObject
.
PMJSON v0.9.2
- CocoaPods support.
PMJSON v0.9.1
- Linux support.
- Swift Package Manager support.
- Rename instances of
plist
in the API tons
. The old names are still available but marked as deprecated. - Support the latest Swift snapshot (2012-02-08).