mdb_json: Export Data In An MDB Table To JSON

View source: R/advanced.R

mdb_jsonR Documentation

Export Data In An MDB Table To JSON

Description

mdb-json is a utility program distributed with MDB Tools. It produces JSON output for the given table. Such output is suitable for parsing in a variety of languages.

Usage

mdb_json(
  path,
  table,
  date_format = "%Y-%m-%d",
  time_format = "%Y-%m-%d %H:%M:%S",
  no_unprintable = FALSE,
  n = -1L
)

Arguments

path

Path to .mdb/.accdb file.

table

Table name.

date_format

Equivalent to -D/--date-format.

time_format

Equivalent to -T/--time-format.

no_unprintable

Equivalent to -U/--no-unprintable.

n

Optional row limit.

Value

JSON string.

Examples

db <- mdbr:::.mdb_example_nwind_path()
if (nzchar(db) && requireNamespace("jsonlite", quietly = TRUE)) {
  mdb_json(db, "Products", n = 2)
}

mdbr documentation built on May 28, 2026, 5:09 p.m.