Mercurial > pub > dyncall > bindings
view R/scratch/test_json.R @ 41:3abd4f1ab473
- erlang binding: update to dc 1.1 and added note about missing feature
author | Tassilo Philipp |
---|---|
date | Tue, 14 Apr 2020 18:23:13 +0200 |
parents | 0cfcc391201f |
children |
line wrap: on
line source
library(rjson) parseJSON <- function(path) { parser <- newJSONParser() f <- file(path) open(f) while(TRUE) { aLine <- readLines(f, 1) if (length(aLine) == 0) break parser$addData( aLine ) } close(f) parser$getObject() } # TEST: testfile <- "/lab/eclipse/dyncall/rdyncall/inst/dynports/GL.json" x <- parseJSON(testfile) # print(glinfo)