<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to Parse a strange json output and insert into a db in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-to-Parse-a-strange-json-output-and-insert-into-a-db/m-p/2222947#M16336</link>
    <description>&lt;P&gt;That looks like an escaped Java String representation of JSON within JSON. Your "string" fields value looks like....&lt;/P&gt; 
&lt;PRE&gt;"{\"leads\":[{\"id\":\"cqzv70in4wrhhdu3\",\"cid\":\"cqzv70in4wrhhdu3\",
\"mid\":\"1430488\",\"email\":\"xxxxxxxxx\",
\"created_at\":\"2019-10-22T20:34:39.982Z\",\"updated_at\":\"2019-10-22T20:35:52.533Z\",
\"lead_score\":0,\"subscribed\":true,
\"dynamic_attributes\":{\"city\":\"Paris\",\"first_name\":\"xxxxxxxx\",
\"indiquez_votre_numéro_de_fixe_\/_mobile\":\"xxxxxxxx\",
\"je_souhaite_recevoir_des_informations_\\u0026_jeux_concours_des_parten\":false,
\"je_souhaite_recevoir_des_informations_\\u0026_jeux_concours_du_groupe_\":true,
\"last_name\":\"xxxxxxx\",\"pays\":\"France\",........."&lt;/PRE&gt; 
&lt;P&gt;A way of dealing with this would be to use something like&amp;nbsp;org.apache.commons.lang3.StringEscapeUtils to unescape this String and then use a tExtractJSONField component to extract the data from the unescaped String. You will need the Apache Commons-Lang3 Jar for this. Take a look here at the Javadocs....&lt;BR /&gt;&lt;A href="https://commons.apache.org/proper/commons-lang/apidocs/index.html?org/apache/commons/lang3/StringEscapeUtils.html" target="_blank" rel="nofollow noopener noreferrer"&gt;https://commons.apache.org/proper/commons-lang/apidocs/index.html?org/apache/commons/lang3/StringEscapeUtils.html&lt;/A&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 28 Oct 2019 18:09:09 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-10-28T18:09:09Z</dc:date>
    <item>
      <title>How to Parse a strange json output and insert into a db</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-Parse-a-strange-json-output-and-insert-into-a-db/m-p/2222946#M16335</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I am back with more questions, hope this reaches you well.&lt;/P&gt; 
&lt;P&gt;So from a Rest API extraction, I have been receiving such below JSON file.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;[{"string":"{\"leads\":[{\"id\":\"cqzv70in4wrhhdu3\",\"cid\":\"cqzv70in4wrhhdu3\",&lt;BR /&gt;\"mid\":\"1430488\",\"email\":\"xxxxxxxxx\",&lt;BR /&gt;\"created_at\":\"2019-10-22T20:34:39.982Z\",\"updated_at\":\"2019-10-22T20:35:52.533Z\",&lt;BR /&gt;\"lead_score\":0,\"subscribed\":true,&lt;BR /&gt;\"dynamic_attributes\":{\"city\":\"Paris\",\"first_name\":\"xxxxxxxx\",&lt;BR /&gt;\"indiquez_votre_numéro_de_fixe_\/_mobile\":\"xxxxxxxx\",&lt;BR /&gt;\"je_souhaite_recevoir_des_informations_\\u0026_jeux_concours_des_parten\":false,&lt;BR /&gt;\"je_souhaite_recevoir_des_informations_\\u0026_jeux_concours_du_groupe_\":true,&lt;BR /&gt;\"last_name\":\"xxxxxxx\",\"pays\":\"France\", .........&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I don't know how to parse this content and insert into my DB.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thank you all for your help, millions times.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2019 16:48:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-Parse-a-strange-json-output-and-insert-into-a-db/m-p/2222946#M16335</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-10-28T16:48:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to Parse a strange json output and insert into a db</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-Parse-a-strange-json-output-and-insert-into-a-db/m-p/2222947#M16336</link>
      <description>&lt;P&gt;That looks like an escaped Java String representation of JSON within JSON. Your "string" fields value looks like....&lt;/P&gt; 
&lt;PRE&gt;"{\"leads\":[{\"id\":\"cqzv70in4wrhhdu3\",\"cid\":\"cqzv70in4wrhhdu3\",
\"mid\":\"1430488\",\"email\":\"xxxxxxxxx\",
\"created_at\":\"2019-10-22T20:34:39.982Z\",\"updated_at\":\"2019-10-22T20:35:52.533Z\",
\"lead_score\":0,\"subscribed\":true,
\"dynamic_attributes\":{\"city\":\"Paris\",\"first_name\":\"xxxxxxxx\",
\"indiquez_votre_numéro_de_fixe_\/_mobile\":\"xxxxxxxx\",
\"je_souhaite_recevoir_des_informations_\\u0026_jeux_concours_des_parten\":false,
\"je_souhaite_recevoir_des_informations_\\u0026_jeux_concours_du_groupe_\":true,
\"last_name\":\"xxxxxxx\",\"pays\":\"France\",........."&lt;/PRE&gt; 
&lt;P&gt;A way of dealing with this would be to use something like&amp;nbsp;org.apache.commons.lang3.StringEscapeUtils to unescape this String and then use a tExtractJSONField component to extract the data from the unescaped String. You will need the Apache Commons-Lang3 Jar for this. Take a look here at the Javadocs....&lt;BR /&gt;&lt;A href="https://commons.apache.org/proper/commons-lang/apidocs/index.html?org/apache/commons/lang3/StringEscapeUtils.html" target="_blank" rel="nofollow noopener noreferrer"&gt;https://commons.apache.org/proper/commons-lang/apidocs/index.html?org/apache/commons/lang3/StringEscapeUtils.html&lt;/A&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2019 18:09:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-Parse-a-strange-json-output-and-insert-into-a-db/m-p/2222947#M16336</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-10-28T18:09:09Z</dc:date>
    </item>
  </channel>
</rss>

