Skip to content

Conversation

@celsowm
Copy link

@celsowm celsowm commented Jun 29, 2025

This commit introduces a C implementation of a json_table-like function that processes a JSON string and transforms it into a tabular data structure.

Key features:

  • Parses JSON using the cJSON library.
  • Implements a basic JSONPath engine for selecting row data and column data. Supports $.object.child, $[index], and $.array[*].
  • Defines data structures for table, rows, and column definitions.
  • Converts JSON values to C types (int, double, string), with JSON nulls being converted to 0/0.0 for numeric types and NULL for strings.
  • Includes a demonstration program (main.c) with various examples.
  • Provides a Makefile for building the demonstration program.

This commit introduces a C implementation of a `json_table`-like function
that processes a JSON string and transforms it into a tabular data structure.

Key features:
- Parses JSON using the cJSON library.
- Implements a basic JSONPath engine for selecting row data and column data.
  Supports `$.object.child`, `$[index]`, and `$.array[*]`.
- Defines data structures for table, rows, and column definitions.
- Converts JSON values to C types (int, double, string), with JSON nulls
  being converted to 0/0.0 for numeric types and NULL for strings.
- Includes a demonstration program (`main.c`) with various examples.
- Provides a Makefile for building the demonstration program.
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.

1 participant