DefaultDataMatrixStringEncoder
public struct DefaultDataMatrixStringEncoder : DataMatrixStringEncoder
Default implementation of DefaultDataMatrixStringEncoder
to encode an array of ErxTaskMatrixCode
into a
representive json string
-
Default initalizer
Declaration
Swift
public init(jsonEncoder: JSONEncoder = JSONEncoder())
Parameters
jsonEncoder
encoder to use for doing the conversion
-
Creates a json string representable for an instance that conforms to the
ErxTaskMatrixCode
protocolThrows
an error that illustrates that string conversion failedDeclaration
Swift
public func stringEncode(tasks: [ErxTaskMatrixCode]) throws -> String
Parameters
tasks
objects conforming to
ErxTaskMatrixCode
protocolReturn Value
a string with the
ErxTaskMatrixCode
s information -
Creates a json string representable for an instance that conforms to the
ErxChargeItemMatrixCode
protocolThrows
an error if the access code is missing or the string conversion failedDeclaration
Swift
public func stringEncode(chargeItem: ErxChargeItemMatrixCode) throws -> String
Parameters
chargeItem
objects conforming to
ErxChargeItemMatrixCode
protocolReturn Value
a string with the
ErxChargeItemMatrixCode
s information