项目作者: JuliaData

项目描述 :
JSON3.jl + Tables.jl
高级语言: Julia
项目地址: git://github.com/JuliaData/JSONTables.jl.git
创建时间: 2019-07-15T20:49:58Z
项目社区:https://github.com/JuliaData/JSONTables.jl

开源协议:MIT License

下载


JSONTables.jl

CI
codecov
deps
version
pkgeval

A package that provides a JSON integration with the Tables.jl interface, that is, it provides the jsontable function as a way to treat a JSON object of arrays, or a JSON array of objects, as a Tables.jl-compatible source. This allows, among other things, loading JSON “tabular” data into a DataFrame, or a JuliaDB.jl table, or written out directly as a csv file.

JSONTables.jl also provides two “write” functions, objecttable and arraytable, for taking any Tables.jl-comptabile source (e.g. DataFrame, CSV.File, etc.) and writing the table out either as a JSON object of arrays, or array of objects, respectively.

So in short:

  1. # treat a json object of arrays or array of objects as a "table"
  2. jtable = jsontable(json_source)
  3. # turn json table into DataFrame
  4. df = DataFrame(jtable)
  5. # turn DataFrame back into json object of arrays
  6. objecttable(df)
  7. # turn DataFrame back into json array of objects
  8. arraytable(df)