All Versions
10
Latest Version
Avg Release Cycle
99 days
Latest Release
2077 days ago

Changelog History

  • v4.0.0 Changes

    April 03, 2019

    🚚 This version moves Unbox to Xcode 10.2 and Swift 5, and with that comes some API changes that will require manual fixes for users adopting this new version.

    Since Swift now automatically flattens optionals returned from throwing functions called with try?, Unbox now uses throwing APIs for all unboxing methods. That means that while in previous versions, you’d unbox an optional property like this:

    struct User: Unboxable { var name: String?init(unboxer: Unboxer) throws { name = unboxer.unbox(key: "name") } }
    

    You’ll now have to prefix such calls with try?:

    struct User: Unboxable { var name: String?init(unboxer: Unboxer) throws { name = try? unboxer.unbox(key: "name") } }
    

    🚚 While I realize that the above change brings a slight regression in terms of Unbox’s ease-of-use, it’s necessary in order to make Unbox support the latest Swift tools within a reasonable scope, and also moves Unbox's API to be more inline with modern Swift conventions for throwing methods.

    πŸ— > View build details and download artifacts on buddybuild:
    πŸ— > Unbox (iOS, Unbox-iOS)

  • v3.1.0 Changes

    February 09, 2019

    This version migrates Unbox to Swift 4.2.

    πŸ— > View build details and download artifacts on buddybuild:
    πŸ— > Unbox (iOS, Unbox-iOS)

  • v3.0.0 Changes

    April 30, 2018

    This version migrates Unbox to Swift 4.1

    πŸ— > View build details and download artifacts on buddybuild:
    πŸ— > Unbox (iOS, Unbox-iOS)

  • v2.5.0 Changes

    June 05, 2017

    πŸ“¦ This version of Unbox adds support for Xcode 9 and Swift 3.2, as well as re-organizes the project to be easier to browse, with separate files for each part of the API. It also enables the tests to be run using the Swift Package Manager.

  • v2.4.0 Changes

    February 17, 2017
    • You can now unbox a dictionary of models directly using the top-level unbox() function. Works with both Data and UnboxableDictionary. Implemented by @mislavjavor.
    • Decimal is now a first-class number type, and gets automatically converted from other number types and strings. Implemented by @bencallis.
    • You can now unbox Set directly from an array, without any custom transformation code. Implemented by @hartbit.
  • v2.3.1 Changes

    February 01, 2017

    More unbox() functions that return an Array can now (optionally) be passed the allowInvalidElements parameter.

  • v2.3.0 Changes

    November 30, 2016
    • UnboxPathError is now public, meaning that the detailed error reporting introduced in 2.2 has now been combined with the granularity of earlier versions. UnboxError is again an enum to enable developers to switch on the different cases.
    • ⚑️ Xcode settings have now been updated for 8.1. No more ⚠️.
    • 🍱 Unbox now has a shiny new logo (kind of shiny anyway, I'm not a designer 😁).
    • When unboxing Data to an array, you can now start unboxing at a certain key path.
    • Unbox can again be used by dragging Unbox.swift directly into a project, instead of using it as a library.
  • v2.2.1 Changes

    November 04, 2016

    πŸš€ This release makes Unbox usable with the new version of the Swift Package Manager.

  • v2.2.0 Changes

    October 23, 2016

    This version is focused on increasing Unbox's speed - it's now up to 50% faster compared to the previous version! It also contains error reporting improvements.

    Perfrormance

    • Unboxing collections is now up to 25% faster, because of decreased iteration complexity.
    • Unboxing with key paths is now up to 50% faster, since associated enum values is no longer used.

    πŸš€ The next releases of Unbox will continue to make performance improvements in order to make decoding your JSON even more... eh... swift πŸ˜‰

    Error reporting

    πŸ–¨ Unbox now produces a coherent, easy to read error type. UnboxError has been made into a struct instead of an enum, and when printed - it produces easily debuggable information.

    For example, here's how an invalid array element would be reported in Unbox 2.1 or earlier:

    [UnboxError] Invalid value ([1, "Bad value", 3]) for key "array"
    

    And here's how Unbox 2.2 reports the same error:

    [UnboxError] An error occured while unboxing path "model.array": Invalid array element ("Bad value") at index 1. 
    

    This also means you only have to catch one error type (UnboxError) instead of performing complex pattern matching.

  • v2.1.1 Changes

    October 22, 2016

    Decimal can now be unboxed directly (thanks @garnett!)