Skip to content

Latest commit

 

History

History
140 lines (137 loc) · 2.3 KB

README.md

File metadata and controls

140 lines (137 loc) · 2.3 KB

csv2json

Use the image deployed on Docker Hub

$ docker run -i giuscri/csv2json [-s <separator>] < file.csv > file.json

Example

$ curl -sL https://people.sc.fsu.edu/\~jburkardt/data/csv/biostats.csv | docker run -i giuscri/csv2json | jq .
[
  {
    "Name": "Alex",
    "Sex": "M",
    "Age": "41",
    "Height (in)": "74",
    "Weight (lbs)": "170"
  },
  {
    "Name": "Bert",
    "Sex": "M",
    "Age": "42",
    "Height (in)": "68",
    "Weight (lbs)": "166"
  },
  {
    "Name": "Carl",
    "Sex": "M",
    "Age": "32",
    "Height (in)": "70",
    "Weight (lbs)": "155"
  },
  {
    "Name": "Dave",
    "Sex": "M",
    "Age": "39",
    "Height (in)": "72",
    "Weight (lbs)": "167"
  },
  {
    "Name": "Elly",
    "Sex": "F",
    "Age": "30",
    "Height (in)": "66",
    "Weight (lbs)": "124"
  },
  {
    "Name": "Fran",
    "Sex": "F",
    "Age": "33",
    "Height (in)": "66",
    "Weight (lbs)": "115"
  },
  {
    "Name": "Gwen",
    "Sex": "F",
    "Age": "26",
    "Height (in)": "64",
    "Weight (lbs)": "121"
  },
  {
    "Name": "Hank",
    "Sex": "M",
    "Age": "30",
    "Height (in)": "71",
    "Weight (lbs)": "158"
  },
  {
    "Name": "Ivan",
    "Sex": "M",
    "Age": "53",
    "Height (in)": "72",
    "Weight (lbs)": "175"
  },
  {
    "Name": "Jake",
    "Sex": "M",
    "Age": "32",
    "Height (in)": "69",
    "Weight (lbs)": "143"
  },
  {
    "Name": "Kate",
    "Sex": "F",
    "Age": "47",
    "Height (in)": "69",
    "Weight (lbs)": "139"
  },
  {
    "Name": "Luke",
    "Sex": "M",
    "Age": "34",
    "Height (in)": "72",
    "Weight (lbs)": "163"
  },
  {
    "Name": "Myra",
    "Sex": "F",
    "Age": "23",
    "Height (in)": "62",
    "Weight (lbs)": "98"
  },
  {
    "Name": "Neil",
    "Sex": "M",
    "Age": "36",
    "Height (in)": "75",
    "Weight (lbs)": "160"
  },
  {
    "Name": "Omar",
    "Sex": "M",
    "Age": "38",
    "Height (in)": "70",
    "Weight (lbs)": "145"
  },
  {
    "Name": "Page",
    "Sex": "F",
    "Age": "31",
    "Height (in)": "67",
    "Weight (lbs)": "135"
  },
  {
    "Name": "Quin",
    "Sex": "M",
    "Age": "29",
    "Height (in)": "71",
    "Weight (lbs)": "176"
  },
  {
    "Name": "Ruth",
    "Sex": "F",
    "Age": "28",
    "Height (in)": "65",
    "Weight (lbs)": "131"
  }
]