createCppJsonFile: Create a C++ Json object from a Json file

View source: R/serialization.R

createCppJsonFileR Documentation

Create a C++ Json object from a Json file

Description

Create a C++ Json object from a Json file

Usage

createCppJsonFile(json_filename)

Arguments

json_filename

Name of file to read. Must end in .json.

Value

CppJson object

Examples

example_vec <- runif(10)
example_json <- createCppJson()
example_json$add_vector("myvec", example_vec)
tmpjson <- tempfile(fileext = ".json")
example_json$save_file(file.path(tmpjson))
example_json_roundtrip <- createCppJsonFile(file.path(tmpjson))
unlink(tmpjson)

stochtree documentation built on April 4, 2025, 2:11 a.m.