Repository navigation
coffeejson-swift 1.1.1
Reads and writes CoffeeJSON 1.1, and follows the spec where decoding, units
and the schema validator diverged from it.
Fixed
ImportedTasting.extractionYieldPercentno longer uses the recipe's target
yield when the tasting carries a measured yield it cannot read as one mass,
a window or an unrecognized unit. It derives nothing instead, because the
spec takes the beverage mass from the tasting whenever it carries one.Codec.decodeDocumentapplies the version gate before it decodes any
collection. A document of another major now reports.unsupportedVersion
even when its recipes, beans or tastings have a shape this major does not
read, where it used to report a field of that shape.- A recipe whose
watercarries a unit the package does not recognize reads
as stating no water, as the spec requires. It imports throughratiowhen
it states one and otherwise fails with.missingRequiredField("water").
It used to import withwaterStatedByVolumeset and no volume. SchemaValidatorassertsformat: uri, as the format's own harness does.
Aurlorbased_onthat is not a URI now fails the gate, where it used to
pass it. The fixture corpus rejects four documents on that keyword alone.- An
ounceconverts to grams at the format's 28.349523125 g, where it used
Foundation's 28.3495 g. A recipe stated as 1 oz to 15 oz now has a ratio of
exactly 15.KnownMassUnit.foundationUnitstill names Foundation's ounce.
Changed
-
The doc comment on
Party.rolesays a role may appear on any credit, an
authoror aroasteras well as a producer. It said a role was absent on
those two. -
ImportError.Kind.allCaseslists the twelve kinds in the order of the
format's error table, with.notAURLand.notHTTPlast. They were first.