src/library/jsonlite/R/asJSON.NULL.R

# Note that this is different from RJSONIO because null values are NA.
setMethod("asJSON", "NULL", function(x, null = "list", ...) {
  if(null == "null"){
    return("null")
  } else {
    return("{}")
  }
})
r-lib/pak documentation built on Nov. 9, 2024, 2:34 a.m.