fork(1) download
  1. #!/bin/bash
  2. sed -e 's/{\(\([0-9.]\+\|false\|true\|null\|"[^"]*"\) *,\)/[\1/g' \
  3. -e 's/\(, *\([0-9.]\+\|false\|true\|null\|"[^"]*"\)\)}/\1]/g'
Success #stdin #stdout 0.01s 5544KB
stdin
{"hello": 1, "grid": {"C1", "D1", "E1", "C2", "D2", "E2", "F2", "B3", "C3", "D3", "E3", "F3", "B4", "C4", "D4", "E4", "F4", "C5", "D5", "E5", "F5", "C6", "D6", "E6"}, "something": "else"}
stdout
{"hello": 1, "grid": ["C1", "D1", "E1", "C2", "D2", "E2", "F2", "B3", "C3", "D3", "E3", "F3", "B4", "C4", "D4", "E4", "F4", "C5", "D5", "E5", "F5", "C6", "D6", "E6"], "something": "else"}