JSON and data frames

There are two ways to encode a data frame as JSON:

  • an object of (named) columns
{
  "x": ["a", "x", "z"],
  "y": [10, null, 3]
}
  • an array of (unnamed) rows
[
  {"x": "a", "y": 10},
  {"x": "x", "y": null},
  {"x": "z", "y": 3}
]