What's Changed
- Read the channel's data encoder live when encoding annotations by @SimonWoolf in #2231
- Render
JSONValueas compact JSON text by @maratal in #2257 - Add per-case value accessors to the primitive path object and instance by @maratal in #2260
- Expand the LiveObjects README usage section and point to the web docs by @sacOO7 in #2258
CocoaPods and Carthage consumers receive only the Ably product, for which the sole change in this release is the annotations fix (#2231); everything else is in the AblyLiveObjects product, available via Swift Package Manager only.
Breaking LiveObjects API changes
The AblyLiveObjects public API changed in this release:
PrimitivePathObjectgains six per-case value accessors (stringValue()…jsonObjectValue()), andPrimitiveInstancegains the same six as throwing properties, for reading a primitive whose type is known at the call site.- The per-case getters on
Primitive(stringValue,numberValue,boolValue,dataValue,jsonArrayValue,jsonObjectValue) and the same six onLiveMapValueare no longer public. Read one expected primitive type through the new accessors onPrimitivePathObject(try node.asPrimitive().stringValue()) orPrimitiveInstance(try instance.stringValue), orswitchoverPrimitive's cases.LiveMapValuekeepsprimitiveValue,liveMapValue,liveCounterValueand itsExpressibleBy*Literalconformances.
Full Changelog: 1.3.0...1.4.0