Skip to content

Releases: postmates/PMJSON

PMJSON v2.0.0

03 Jan 23:34
Compare
Choose a tag to compare
  • 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 a Double will be decoded as a Decimal instead.
  • Add a set of forEach accessors for working with arrays, similar to the existing map and flatMap accessors.

PMJSON v1.2.1

27 Oct 19:46
Compare
Choose a tag to compare
  • 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

27 Oct 07:09
Compare
Choose a tag to compare
  • 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-1 or 1e+1.
  • When the strict option is specified, stop accepting numbers of the form 01 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

20 Oct 18:18
Compare
Choose a tag to compare
  • Full JSON stream support. JSONParser and JSONDecoder can now both operate in streaming mode, a new type JSONStreamDecoder was added as a lazy sequence of JSON values, and a convenience method JSON.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 { … }.* Add Hashable to JSONEvent and JSONParserError.
  • Make JSONParserError conform to CustomNSError for better Obj-C errors.
  • Rename JSONEventGenerator to JSONEventIterator and JSONParserGenerator to JSONParserIterator. The old names are available (but deprecated) for backwards compatibility.

PMJSON V1.0.1

15 Sep 23:49
Compare
Choose a tag to compare

This release fixes CocoaPods support, and also improves compile times slightly.

PMJSON v1.0.0

08 Sep 20:23
Compare
Choose a tag to compare

This release supports Swift 3.

PMJSON v0.9.4

08 Sep 20:09
Compare
Choose a tag to compare

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 for JSONError. Setting this up requires calling JSONError.registerNSErrorUserInfoProvider().

PMJSON v0.9.3

23 May 21:27
Compare
Choose a tag to compare
  • Add new set of convenience JSON initializers.
  • Change description and debugDescription for JSON and JSONObject to be more useful.
    description is now the JSON-encoded string.
  • Implement CustomReflectable for JSON and JSONObject.

PMJSON v0.9.2

23 May 21:26
Compare
Choose a tag to compare
  • CocoaPods support.

PMJSON v0.9.1

19 Feb 20:04
Compare
Choose a tag to compare
  • Linux support.
  • Swift Package Manager support.
  • Rename instances of plist in the API to ns. The old names are still available but marked as deprecated.
  • Support the latest Swift snapshot (2012-02-08).