This sample demonstrates how to interact with the Oracle JSON data type using plain JDBC. A console-style program inserts, queries, updates, and deletes JSON documents stored in a relational table while leveraging SQL/JSON operators like `json_value` and `json_transform`.
What this sample demonstrates
JSON
Document-shaped data and SQL/JSON querying inside Oracle AI Database.
Use when records need flexible structure without leaving SQL, indexes, constraints, and transactions.
Testcontainers
Disposable Oracle AI Database Free containers for repeatable local and integration tests.
Use when tests need real database behavior without sharing a long-lived development instance.
Highlights
- Bind JSON payloads as VARCHAR2/SQL JSON and hydrate them back into Jakarta JSON JsonObject instances.
- Filter documents by attributes with json_value and apply in-place updates via json_transform.
- Exercise the complete insert/read/update/delete lifecycle against a JSON column backed by Oracle AI Database Free.
- Validate the flow with a Testcontainers-powered integration test that provisions a fresh database for each run.