Skip to content

//workflow/com.squareup.workflow1/parse

parse

[jvm]
Content
inline fun <T> ByteString.parse(block: (BufferedSource) -> T): T
More info

Runs block with a BufferedSource that will read from this ByteString.

Lets you do stuff like:

myBlob.parse {
MyValueObject(
name = it.readUtf8WithLength(),
age = it.readInt()
)
}