iostream.blob.readobject
Deserializes an object from the stream
Parameters
classes | table|null | classes the serialized data is allowed to instantiate optional |
Return value
See iostream.stream.readobject for the generic contract.
Notes
Pairing writeobject and readobject on the same in-memory blob round-trips a value without touching a file.
Example
from "iostream" import blob
let b = blob(0)
b.writeobject({ a = 1, b = "x" })
b.seek(0) // rewind before reading back
let back = b.readobject()
println($"{back.a},{back.b}")Output:
1,xSee also
readobject | Deserializes an object from the stream |
writeobject | Serializes the object to the stream |
| blob | class index |