<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>How to display Blob /Json data field?</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=120974783" />
  <subtitle>How to display Blob /Json data field?</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=120974783</id>
  <updated>2026-04-03T20:18:23Z</updated>
  <dc:date>2026-04-03T20:18:23Z</dc:date>
  <entry>
    <title>RE: How to display Blob /Json data field?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120981722" />
    <author>
      <name>Olaf Kock</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120981722</id>
    <updated>2021-07-25T15:35:14Z</updated>
    <published>2021-07-25T15:35:12Z</published>
    <summary type="html">&lt;p&gt;
  &lt;a href="https://stackoverflow.com/q/68490704/13447"&gt;Answered on
  stackoverflow&lt;/a&gt;. Please do not crosspost!&lt;/p&gt;</summary>
    <dc:creator>Olaf Kock</dc:creator>
    <dc:date>2021-07-25T15:35:12Z</dc:date>
  </entry>
  <entry>
    <title>How to display Blob /Json data field?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120974782" />
    <author>
      <name>Mohommod Khan</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120974782</id>
    <updated>2021-08-17T15:29:26Z</updated>
    <published>2021-07-22T18:09:46Z</published>
    <summary type="html">&lt;p&gt;I am using service builder that is retrieving the form data fine from
  mysql db.  I have a field that has the json data and I tried to map it
  using object mapper and
  using com.fasterxml.jackson.databind.ObjectMapper to display the json
  content.  However the Blob Data is shown as  : com.mysql.cj.jdbc.Blob@4ca74f7f&lt;/p&gt;
&lt;p&gt;How do I actually get/extract the data from the storing link above? 
  Here is my code snippet:&lt;/p&gt;
&lt;p&gt; for (ddmcontent MyTemp : myList) {&lt;br /&gt;    &lt;br /&gt;     
   System.out.println(&amp;quot;Content ID       :
  &amp;quot;+myList.getContentId());&lt;br /&gt;     
   System.out.println(&amp;quot;User Blob Data   :
  &amp;quot;+myList.getData()); &lt;br /&gt;       Blob responseBody =myList.getData();&lt;/p&gt;
&lt;p&gt;ObjectMapper objectMapper = new ObjectMapper(); &lt;br /&gt;               &lt;/p&gt;
&lt;p&gt;List&amp;lt;ModelData&amp;gt; myDat = objectMapper.readValue((DataInput)    
  responseBody,objectMapper.getTypeFactory().constructCollectionType(List.class,ModelData.class)); &lt;br /&gt;
                for (ModelData dt : myDat) {&lt;br /&gt;               &lt;br /&gt;
                System.out.println(&amp;quot;User Name              :
  &amp;quot;+dt.Name);&lt;br /&gt;               System.out.println(&amp;quot;Users
  Email            : &amp;quot;+dt.Email);&lt;/p&gt;
&lt;p&gt;         }&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;Please note I have defined my ModelData elements as all String.&lt;/p&gt;
&lt;p&gt;Any suggestion? What am I missing?&lt;/p&gt;
&lt;p&gt;Thanks in advance!&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</summary>
    <dc:creator>Mohommod Khan</dc:creator>
    <dc:date>2021-07-22T18:09:46Z</dc:date>
  </entry>
</feed>
