New versions: Dev (3.14) | Latest (3.13) | 3.12 | 3.11 | 3.10 | 3.9 | 3.8 | Old versions: 3.7 | 3.6 | 3.5 | 3.4 | 3.3

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.

The jOOQ Logo