All Versions
11
Latest Version
Avg Release Cycle
105 days
Latest Release
1596 days ago

Changelog History
Page 1

  • v4.0.0 Changes

    November 15, 2019
    • โšก๏ธ Update to Swift 5.
    • When encoding/decoding URLs with JSON.Encoder and JSON.Decoder, encode and decode their absolute string instead of relying on the native implementation which encodes them as an object. This matches the behavior of JSONEncoder and JSONDecoder.
    • ๐Ÿ›  Fix availability attribute for JSON.Encoder.DateEncodingStrategy.iso8601WithFractionalSeconds.
    • โฌ†๏ธ Bump JSON.Encoder.DateEncodingStrategy.iso8601WithFractionalSeconds and JSON.Encoder.DateEncodingStrategy.iso8601WithFractionalSeconds to iOS 11.2+ and tvOS 11.2+ as, despite the constant being marked as available earlier, it's not supported at runtime. (#33)
    • Convert JSONObject.ns and JSONObject.nsNoNull to return a [String: Any] instead of an [AnyHashable: Any]. (#25)
    • Split JSON.Encoder.encodeAs* and JSON.Decoder.decode methods into overload pairs where one takes options: and the other doesn't. This makes it easier to replace function references to JSONEncoder/JSONDecoder methods with the equivalents from PMJSON.
    • โž• Add conformance to Combine's TopLevelEncoder and TopLevelDecoder, using Data as the input/output type. This means that JSON.Encoder.encode(_:) is now marked as deprecated instead of unavailable.
    • Rename JSON.flatMap* and JSONObject.flatMap* methods to .compactMap* instead when the transformation returns an optional. (#28)
    • Mark a lot of methods as @inlinable.
  • v3.1.2 Changes

    November 07, 2018
    • โž• Add method JSONError.withPrefix(_:) that returns a new error by prepending a prefix onto the path. This can be used in custom parsing code to produce good errors if the existing convenience functions don't do what you want. (#26)
  • v3.1.1 Changes

    May 18, 2018
    • โš  Squelch Swift 4.1 warnings.
  • v3.1.0 Changes

    February 26, 2018
    • ๐Ÿ‘Œ Improve .pretty output for empty arrays/dictionaries.
    • Speed up JSON.encodeAsData() pretty significantly. It's now very nearly as fast as JSON.encodeAsString().
    • Speed up JSON.Encoder.encodeAsString() and JSON.Encoder.encodeAsData().
    • Add a couple of convenience static methods to JSON that mimic the enum cases: JSON.int(_:) and JSON.cgFloat(_:). These can be used when JSON(_:) triggers too much type complexity. Also add a JSON(_:) override for CGFloat.
    • โž• Add JSON.Encoder.keyEncodingStrategy. This is very similar to Swift 4.1's JSONEncoder.keyEncodingStrategy, although by default it won't apply to any nested values of type JSON or JSONObject (there's another option applyKeyEncodingStrategyToJSONObject that controls this).
    • โž• Add JSON.Decoder.keyDecodingStrategy. This is very similar to Swift 4.1's JSONDecoder.keyDecodingStrategy, although by default it won't apply to decoding any values of type JSON or JSONObject (there's another option applyKeyDecodingStrategyToJSONObject that controls this).
    • โž• Add JSON.Encoder.dateEncodingStrategy. This is very similar to JSONEncoder.dateEncodingStrategy except it includes another case for encoding ISO8601-formatted dates with fractional seconds (on Apple platforms).
    • โž• Add JSON.Decoder.dateDecodingStrategy. This is very similar to JSONDecoder.dateDecodingStrategy except it includes another case for decoding ISO8601-formatted dates with fractional seconds (on Apple platforms).
    • โž• Add JSON.Encoder.dataEncodingStrategy. This is identical to JSONEncoder.dataEncodingStrategy.
    • โž• Add JSON.Decoder.dataDecodingStrategy. This is identical to JSONDecoder.dataDecodingStrategy.
  • v3.0.2 Changes

    February 22, 2018
    • โž• Add convenience property JSONError.path.
    • โž• Add method JSONError.withPrefixedCodingPath(_:) to make it easier to use JSONError-throwing methods in a Decodable implementation.
  • v3.0.1 Changes

    February 19, 2018
    • ๐Ÿ›  Fix Swift Package Manager support.
  • v3.0.0 Changes

    February 19, 2018
    • Convert to Swift 4.
    • Implement Codable on JSON.
    • โž• Add a Swift.Decoder implementation called JSON.Decoder.
    • โž• Add a Swift.Encoder implementation called JSON.Encoder.
  • v2.0.3 Changes

    September 12, 2017
    • โž• Add Linux support for Decimal (on Swift 3.1 and later). NOTE: Decimal support is still buggy in Swift 3.1, and the workarounds we employ to get the correct values on Apple platforms don't work on Linux. You probably shouldn't rely on this working correctly on Linux until Swift fixes its Decimal implementation.
    • โž• Add Linux support for decoding from/encoding to Data.
    • โž• Add Linux support for LocalizedError on the Error types (only really applies to Swift 3.1 and later).
    • ๐Ÿ›  Fix compilation on Linux using the release configuration.
    • ๐Ÿ‘Œ Support running the test suite with swift test.
  • v2.0.2 Changes

    March 06, 2017
    • ๐Ÿ›  Fixes Linux compatibility
  • v2.0.1 Changes

    February 26, 2017
    • โž• Add method JSON.parser(for:options:) that returns a JSONParser<AnySequence<UnicodeScalar>> from a Data. Like JSON.decode(_:options:), this method automatically detects UTF-8, UTF-16, or UTF-32 input.
    • ๐Ÿ›  Fix compatibility with Swift Package Manager.