File: jo.20.sh

package info (click to toggle)
jo 1.9-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 612 kB
  • sloc: ansic: 1,914; sh: 566; makefile: 60; exp: 42
file content (13 lines) | stat: -rw-r--r-- 311 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
# read json array elements

echo '{"a":1,"b":"val"}' > $$.1
echo '{"a":478,"b":"other"}' > $$.2

${JO:-jo} -a :$$.1 :$$.2

rm -f $$.1
rm -f $$.2

# read large json array elements
${JO:-jo} -a < ${srcdir:=.}/tests/jo-large1.json
${JO:-jo} -a :${srcdir:=.}/tests/jo-large2.json :${srcdir:=.}/tests/jo-large1.json