tests/serialize.R

library(RJSONIO)
setClass("A", representation(x = "integer", abc = "character"),
          prototype = list(x = 1:10, abc = c("Jan", "Feb", "Mar")))
a = new("A")

toJSON(a)

toJSON(list(a, a))

Try the RJSONIO package in your browser

Any scripts or data that you put into this service are public.

RJSONIO documentation built on Nov. 27, 2023, 5:09 p.m.