Description Usage Arguments Value Examples
This function convert a raw vector into a list following TSON specification binary-encoded format.
1 | fromTSON(bytes)
|
bytes |
A raw vector |
A list
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ## Example
library(rtson)
list = list(integer=42L,
double=42,
bool=TRUE,
uint8=tson.uint8.vec(c(42,0)),
uint16=tson.uint16.vec(c(42,0)),
uint32=tson.uint32.vec(c(42,0)),
int8=tson.int8.vec(c(42,0)),
int16=tson.int16.vec(c(42,0)),
int32=as.integer(c(42,0)),
float32=tson.float32.vec(c(0.0, 42.0)),
float64=c(42.0,42.0),
map=list(x=42, y=42, label="42"),
list=list("42",42)
)
bytes = toTSON(list)
object = fromTSON(bytes)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.