- Use
\u{0}
-separated string for JSONPaths. This reduces the number of overloads needed. In the future this will make it easier to test and add new overloads with more return-types like T
, T?
, [T]
...
let a = json => "key1" => "key2" => "key3" // is equivlent to
let a = json => "key1\u{0}key2\u{0}key3"
// NOTE: Never actually do this, the character or implementation details might change.
- Removed
DecodableArray<T> and NilFilteringArray<T>
. Use either:
[T].decode(object, ignoreInvalidObject: false)
// or
decodeArray(ignoreInvalidObjects: false)(json: object)
- Added public
parse()
-function. This is what all the =>
-overloads are calling.
public func parse<T>(json: AnyObject, path: [String], decode: (AnyObject throws -> T)) throws -> T {