Skip to content

coffeejson-swift 1.1.0

Choose a tag to compare

@ken0nek ken0nek released this 04 Dec 07:05
· 21 commits to main since this release

Reads and writes CoffeeJSON 1.1.

Added

  • Gear.variant says which member of a registered family a piece of gear is,
    for example a size, a material or a generation. The package reads it and
    writes it.
  • ImportedRecipe.brewer and ImportedRecipe.grinder give the gear as the
    document states it, so an app can show its own label for a registered id.
  • GearLabels holds the gear registry's display labels, keyed by language
    tag. GearLabels.forLanguage(_:) narrows a tag such as ja-JP to ja,
    then falls back to en.
  • Gear.displayLabel(using:) renders one piece of gear as a display string.
    Pass your own labels to show a registered id in your locale.

Changed

  • Codec.currentVersion is "1.1".
  • ImportedRecipe.brewerLabel and ImportedRecipe.grindDescription resolve a
    registered id to the registry's label and show variant beside it. For
    custom and an unknown id, they show the stated label as written. Without
    a label, they show brand and model, then the id itself. In 1.0.0 they
    showed the stated label first for every id.