parse

fun parse(bytes: ByteString): TreeSnapshot(source)

Parses a "root" snapshot and the list of child snapshots with associated WorkflowNodeIds from a ByteString returned by toByteString.

Never returns an empty root snapshot: if the root snapshot is empty it will be null. Child snapshots, however, are always returned as-is. They must be recursively passed to this function to continue parsing the tree.

Note that this method is mostly lazy. It will parse the list of child TreeSnapshots, but will not recursively parse each of those.