File: ujson.sh

package info (click to toggle)
golang-github-mailru-easyjson 0.7.7-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bookworm-backports, experimental, forky, sid, trixie
  • size: 860 kB
  • sloc: makefile: 104; sh: 4
file content (7 lines) | stat: -rwxr-xr-x 335 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
#/bin/bash

echo -n "Python ujson module, DECODE: "
python -m timeit -s "import ujson; data = open('`dirname $0`/example.json', 'r').read()" 'ujson.loads(data)'

echo -n "Python ujson module, ENCODE: "
python -m timeit -s "import ujson; data = open('`dirname $0`/example.json', 'r').read(); obj = ujson.loads(data)" 'ujson.dumps(obj)'