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
JSONvariant.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 aDoublewill be decoded as aDecimalinstead. - Add a set of
forEachaccessors for working with arrays, similar to the existingmapandflatMapaccessors.
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
OptionSets). 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-1or1e+1. - When the
strictoption is specified, stop accepting numbers of the form01or-01. - Add support for UTF-16 when decoding a
Datathat has a UTF-16 BOM. - Skip a UTF-8 BOM if present when decoding a
Data.
PMJSON v1.1.0
- Full JSON stream support.
JSONParserandJSONDecodercan now both operate in streaming mode, a new typeJSONStreamDecoderwas 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 { … }.* AddHashabletoJSONEventandJSONParserError. - Make
JSONParserErrorconform toCustomNSErrorfor better Obj-C errors. - Rename
JSONEventGeneratortoJSONEventIteratorandJSONParserGeneratortoJSONParserIterator. 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
NSErroruserInfo provider forJSONError. Setting this up requires callingJSONError.registerNSErrorUserInfoProvider().
PMJSON v0.9.3
- Add new set of convenience
JSONinitializers. - Change
descriptionanddebugDescriptionforJSONandJSONObjectto be more useful.
descriptionis now the JSON-encoded string. - Implement
CustomReflectableforJSONandJSONObject.
PMJSON v0.9.2
- CocoaPods support.
PMJSON v0.9.1
- Linux support.
- Swift Package Manager support.
- Rename instances of
plistin the API tons. The old names are still available but marked as deprecated. - Support the latest Swift snapshot (2012-02-08).