fromTSON {rtson}R Documentation

Deserialize a raw vector

Description

This function convert a raw vector into a list following TSON specification binary-encoded format.

Usage

fromTSON(bytes)

Arguments

bytes

A raw vector

Value

A list

Examples

## 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)

[Package rtson version 1.3 Index]