ReferenceContainer
public struct ReferenceContainer : Equatable
extension ReferenceContainer: DataObjectConvertible
A container for a reference to a variable in the data layer.
JSON Representation
Flat key (created via key(_:)):
{
"key": "email"
}
Nested path (created via path(_:)):
{
"path": "user.address.city"
}
The "path" value uses dot notation for object keys and bracket notation
for array indices (e.g. "items[0].name").
-
Creates a ReferenceContainer to a variable in the root of a JSON object.
Declaration
Swift
public static func key(_ key: String) -> ReferenceContainer -
Creates a ReferenceContainer to a variable nested in a JSON object.
Declaration
Swift
public static func path(_ path: JSONObjectPath) -> ReferenceContainer -
The path to a potentially nested variable in a JSON object.
Declaration
Swift
public var path: JSONObjectPath { get } -
Declaration
Swift
public func toDataObject() -> DataObject
View on GitHub