Skip to content

Claude/add json io support ibz ez#26

Merged
bobjansen merged 3 commits intomainfrom
claude/add-json-io-support-IbzEZ
Mar 7, 2026
Merged

Claude/add json io support ibz ez#26
bobjansen merged 3 commits intomainfrom
claude/add-json-io-support-IbzEZ

Conversation

@bobjansen
Copy link
Owner

No description provided.

claude added 3 commits March 7, 2026 11:35
Introduce a new JSON plugin for reading and writing DataFrames in JSON
format, following the same architecture as the existing CSV and Parquet
plugins.

Reader supports:
- JSON array of objects: [{"a":1}, {"a":2}]
- JSON-Lines format (one object per line)
- Single JSON object (produces one-row DataFrame)
- Type inference: Int64, Double, Bool, String with automatic widening
- Null handling via JSON null values and missing keys
- Categorical compression for low-cardinality string columns

Writer produces pretty-printed JSON array of objects with:
- Native JSON types for Int64, Double, Bool, String
- JSON null for null values (validity bitmap)
- Date/Timestamp serialized as integer values

Files added:
- libs/json/json.hpp — header-only reader/writer implementation
- libs/json/json.cpp — plugin entry point (ibex_register)
- libs/json/json.ibex — import stub for `import "json";`
- libs/json/CMakeLists.txt — shared library build config
- tests/test_json.cpp — 16 Catch2 test cases (read + write + round-trip)

Dependencies:
- nlohmann/json v3.11.3 (header-only, MIT) added via FetchContent

https://claude.ai/code/session_01DaBQq6tTYw6uK1gEqu6EVJ
Add JSON plugin references across all documentation:
- docs/index.html: add write_json to output plugins list and code example
- README.md: add write_json to writing output section, add bundled plugins
  table with all four plugins (csv, json, parquet, udp), add JSON usage notes
- SPEC.md: expand Section 12.1 with JSON plugin table and read_json docs
  (formats, type inference, null handling), add JSON import examples in
  Section 13.4
- INSTALL.md: rename CSV section to "CSV and JSON Plugins", add JSON usage
  example

https://claude.ai/code/session_01DaBQq6tTYw6uK1gEqu6EVJ
The code sample showed read_csv but not read_json. Add the extern
declaration and a usage line so both reader functions are visible.

https://claude.ai/code/session_01DaBQq6tTYw6uK1gEqu6EVJ
@bobjansen bobjansen merged commit c4dc01b into main Mar 7, 2026
2 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants