title: How to read INFORMIX Table JSON Column in Java
body: <p>I would like to read INFORMIX Table column defined as JSON in java using JDBC Call. Here is my Table Schema in INFORMIX 12.10</p>
  
  <pre><code>create row type fullname_t
      (
      first varchar(20),
      middle varchar(20),
      last varchar(20)
      );
  create row type person_t
      (
      name fullname_t,
      age integer
      );
  create row type phone_t
      (
      type varchar(10),
      contact varchar(20)
      );
  create table teachers  (
  id integer,
  person person_t,
  dept varchar(20),
  hobbies LIST(varchar(255) not null),
  phones LIST(phone_t not null),
  address "informix".json not null  );
  </code></pre>
  
  <p>Sample Data</p>
  
  <pre><code>DELETE FROM teachers WHERE 1=1;
  INSERT INTO teachers VALUES (100, "ROW(ROW('Bill', 'William', 'Smith'), 27)", "physics", "LIST{'Cricket', 'Soccer'}","LIST{ROW('FIXED', '08023456789'), ROW('MOBILE', '9035252525')}",'{type: "HOME", addrLine1: "123525", city: "Bangalore", zipCode: "560001", state: "KA", country: "INDIA"}'::JSON);
  INSERT INTO teachers VALUES (101, "ROW(ROW('John', 'Martin', 'Smith'), 30)", "math", "LIST{'Tennis', 'Baseball'}","LIST{ROW('FIXED', '1-800-CALL-SUPPORT')}",'{type: "HOME", addrLine1: "51st A cross 5th Main", city: "Chennai", zipCode: "909404", state: "TN", country: "INDIA"}'::JSON);
  </code></pre>
  
  <p>I am able to read Custom ROW Type(s) like person, phones except for address which is JSON type.</p>
  
  <p>Appreciate any help / advice to read JSON object as String and subsequently, I can get Jackson API to convert JSON String.</p>
  
  <p>Requires custom SQLData map, but not sure how to do for JSON</p>
  
  <p>Output from JDBC Select</p>
  
  <pre><code>Teacher [id=100, person=Person [name=Fullname [first=Bill, middle=William, last=Smith], age=27], dept=physics, hobbies=[Cricket, Soccer], phones=[Phone [type=FIXED, contact=08023456789], Phone [type=MOBILE, contact=9035252525]], address=null]
  Teacher [id=101, person=Person [name=Fullname [first=John, middle=Martin, last=Smith], age=30], dept=math, hobbies=[Tennis, Baseball], phones=[Phone [type=FIXED, contact=1-800-CALL-SUPPORT]], address=null]
  </code></pre>
  
  <p>Thanks in advance</p>