File: python3

package info (click to toggle)
python-ijson 3.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 604 kB
  • sloc: python: 2,509; ansic: 1,618; makefile: 3
file content (16 lines) | stat: -rwxr-xr-x 293 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/env python3
# smoke test

import ijson
import io

events = list(ijson.parse(io.StringIO('{ "key": "value" }')))

print(f'events = {events}')

assert events == [
    ('', 'start_map', None),
    ('', 'map_key', 'key'),
    ('key', 'string', 'value'),
    ('', 'end_map', None)
    ]