"""A tiny JSON-to-table contract; no external service required."""
import json
rows = json.loads('[{"id":"A","amount":0},{"id":"B","amount":null}]')
assert len(rows) == 2
for row in rows:
    assert set(row) == {'id', 'amount'}
    assert isinstance(row['id'], str)
    assert row['amount'] is None or type(row['amount']) in (int, float)
assert rows[0]['amount'] == 0 and rows[1]['amount'] is None
print('PASS: zero and missing remain distinct; 2 rows validated')
