Available in versions: Dev (3.20) | Latest (3.19) | 3.18 | 3.17 | 3.16 | 3.15 | 3.14 | 3.13 | 3.12 | 3.11 | 3.10

Importing JSON

Applies to ✅ Open Source Edition   ✅ Express Edition   ✅ Professional Edition   ✅ Enterprise Edition

The below JSON data represents two author records that may have been exported previously, by jOOQ's exporting functionality:

{"fields" :[{"name":"ID","type":"INTEGER"},
            [2,1,"Animal Farm"]]}

The following examples show how to map source data and target table.

// Specify fields from the target table to be matched with fields from the source JSON array by position.
// Positional matching is independent of the presence of a header information in the JSON content.
      .loadJSON(inputstream, encoding)

// Use "null" field placeholders to ignore source columns by position.
      .loadJSON(inputstream, encoding)
      .fields(BOOK.ID, null, BOOK.TITLE)

No other, JSON-specific options are currently available.


Do you have any feedback about this page? We'd love to hear it!

The jOOQ Logo