ValueContainer

public struct ValueContainer
extension ValueContainer: DataObjectConvertible

A container for a value that is stored as a DataItem.

JSON Representation

The value can be any valid JSON type:

{ "value": "hello" }
{ "value": 42 }
{ "value": ["red", "green", "blue"] }
  • The value stored in this container

    Declaration

    Swift

    public let value: DataItem
  • Creates a value container with the specified value

    Declaration

    Swift

    public init(_ value: DataInput)

    Parameters

    value

    The value to store

  • Declaration

    Swift

    public func toDataObject() -> DataObject