JSON Lines files (.jsonl, .ndjson) are read as CSV and profiled as broken fragments
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- javascript, python
Research direction
Start by running the repro command, which reports 19 rows and 2 columns for a 20-line .jsonl file. The suffix routing is in read_table() in faircode/loaders.py and faircode/loaders_extra.py, and the web side is parseJSON() in assets/profiler-engine.js, with the accept list in profiler.html. Done means either .jsonl/.ndjson load as 20 records with a test in tests/test_loaders.py, or the suffix is rejected with a clear message. Maintainers have not chosen between the two options yet, so confirm which one before writing code.
Written by the indexing model from the issue text.
Description
Where: faircode/loaders.py / faircode/loaders_extra.py read_table() (unknown suffix falls through to the CSV sniffer), assets/profiler-engine.js parseJSON(), assets/profiler-heldout.js / profiler.html (accept list), tests/test_loaders.py.
Current gap: a JSON Lines export (one object per line, the default of many tools) is neither supported nor rejected. The CLI reads it as comma-separated text, so each line is split inside the JSON braces and the "dataset" becomes columns named like {"sex": "f"; the report prints rows and columns and exits 0. The web engine reports "not valid JSON". Neither says that JSON Lines is the problem.
Repro:
$ python3 -c "import json; open('rows.jsonl','w').write('\n'.join(json.dumps({'sex': 'm' if i % 2 else 'f', 'age': 25 + i % 30}) for i in range(20)) + '\n')"
$ python3 -m faircode profile rows.jsonl | grep -E "Rows|Columns"
Rows: 19 Columns: 2 # 20 records, two real columns, no error
Suggested approach: read .jsonl/.ndjson with pd.read_json(lines=True) (and in the web engine by parsing line by line), sharing the flatten rule, and add them to the file picker and the parity tests; if support is declined, reject the suffix with "JSON Lines is not supported: convert to a JSON array".
- Dominant language
- HTML
- Stars
- 47
- Forks
- 45
- Avg merge
- 2h 55m
- Merged PRs (30d)
- 54
Getting set up
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from yakew7/Fair-Code
-
bug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
bug help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
enhancement good first issue
Difficulty 3/5 Half a day Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
bug good first issue
Difficulty 3/5 1-2 days Newbie friendliness 50/100
Maintainers usually reply within 1 day
-
bug good first issue
Difficulty 3/5 Half a day Newbie friendliness 65/100
Maintainers usually reply within 1 day
All issues in yakew7/Fair-Code
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
aws/agentcore-cli#2606 ·
Maintainers usually reply within 1 day
-
os:Linux
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
spqr-coordinator usage shows 'run --config', but 'run' is not a subcommand (unknown command "run")Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
pg-sharding/spqr#3092 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
anomalyco/opencode#56002 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day