Java json

JDBC JSON Data Type Sample

Plain JDBC sample for inserting, querying, updating, and deleting Oracle JSON data.

#Java#JSON#Testcontainers
What this sample helps you learn

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`.

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.