<?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: JSONPath read the dot (.) as child seperator in tFileInputJSON in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/JSONPath-read-the-dot-as-child-seperator-in-tFileInputJSON/m-p/2298890#M71297</link>
    <description>&lt;P&gt;I tried already but it says that invalid escape sequence. Is there any other ways to escape the character?&lt;/P&gt;</description>
    <pubDate>Tue, 25 Jun 2019 02:09:17 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-06-25T02:09:17Z</dc:date>
    <item>
      <title>JSONPath read the dot (.) as child seperator in tFileInputJSON</title>
      <link>https://community.qlik.com/t5/Talend-Studio/JSONPath-read-the-dot-as-child-seperator-in-tFileInputJSON/m-p/2298888#M71295</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have 2 questions regarding the tFileInputJSON.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) How to make the JSONPath can differentiate the dot (.) between the child seperator and the child name itself.&lt;/P&gt;&lt;P&gt;For example in the picture, I already Tried to put the square bracket and also single quote. But there still error cannot find the path.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) How can I select the first data from the JSON path besides using [0] method? For example =&amp;gt; "store.book[0]" . Is there any other method I can use to extract the first data?&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 05:30:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/JSONPath-read-the-dot-as-child-seperator-in-tFileInputJSON/m-p/2298888#M71295</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T05:30:39Z</dc:date>
    </item>
    <item>
      <title>Re: JSONPath read the dot (.) as child seperator in tFileInputJSON</title>
      <link>https://community.qlik.com/t5/Talend-Studio/JSONPath-read-the-dot-as-child-seperator-in-tFileInputJSON/m-p/2298889#M71296</link>
      <description>&lt;P&gt;Try using the escape character \ before the dot.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jun 2019 01:36:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/JSONPath-read-the-dot-as-child-seperator-in-tFileInputJSON/m-p/2298889#M71296</guid>
      <dc:creator>nfz11</dc:creator>
      <dc:date>2019-06-25T01:36:44Z</dc:date>
    </item>
    <item>
      <title>Re: JSONPath read the dot (.) as child seperator in tFileInputJSON</title>
      <link>https://community.qlik.com/t5/Talend-Studio/JSONPath-read-the-dot-as-child-seperator-in-tFileInputJSON/m-p/2298890#M71297</link>
      <description>&lt;P&gt;I tried already but it says that invalid escape sequence. Is there any other ways to escape the character?&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jun 2019 02:09:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/JSONPath-read-the-dot-as-child-seperator-in-tFileInputJSON/m-p/2298890#M71297</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-06-25T02:09:17Z</dc:date>
    </item>
    <item>
      <title>Re: JSONPath read the dot (.) as child seperator in tFileInputJSON</title>
      <link>https://community.qlik.com/t5/Talend-Studio/JSONPath-read-the-dot-as-child-seperator-in-tFileInputJSON/m-p/2298891#M71298</link>
      <description>&lt;P&gt;JSONPath does not support node names with a dot.&amp;nbsp; There is no way to escape them or get around this in pure JSONPath, it is just illegal syntax.&amp;nbsp; So your JSON as it stands now cannot be parsed by JSONPath in Talend.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;A href="https://community.qlik.com/s/feed/0D53p00007vCj57CAC" target="_blank" rel="noopener"&gt;https://community.talend.com/t5/Design-and-Development/Parsing-JSON-columns-having-dot/td-p/131734&lt;/A&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;You need curly brackets around your whole JSON string.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;Here is your JSON formatted and what I used in testing:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;{
  "Time Series (Daily)": {
    "2019-06-14": {&lt;BR /&gt;      "1. open": "132.2600",
      "2. high": "133.7900"
    }
  }
}&lt;/PRE&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;It is also bad practice to have space in your node names and to have node names start with a number, but the [''] syntax gets around that.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Here is the result of some tests I ran on your data and some well-formed sample data:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;Starting job TestJsonParseSpecialCharacters at 02:43 25/06/2019.

[statistics] connecting to socket on port 3905
[statistics] connected
.------------------------------------------------------------------------------------------------.
|                                         #1. tLogRow_1                                          |
+-------+----------------------------------------------------------------------------------------+
| key   | value                                                                                  |
+-------+----------------------------------------------------------------------------------------+
| json  | {"Time Series (Daily)" : {"2019-06-14":{"1. open": "132.2600","2. high": "133.7900"}}} |
| title | JSONPath: won't work with node names with dot.  Best attempt here.                     |
+-------+----------------------------------------------------------------------------------------+

.--------------------------------------------------------.
|                     #1. tLogRow_2                      |
+----------+---------------------------------------------+
| key      | value                                       |
+----------+---------------------------------------------+
| Category | {"1. open":"132.2600","2. high":"133.7900"} |
+----------+---------------------------------------------+

.-----------------------------------------.
|              #1. tLogRow_3              |
+-------+---------------------------------+
| key   | value                           |
+-------+---------------------------------+
| json  | {"a":{"b":{"c": "d","e": "f"}}} |
| title | JSONPath on well-formed data    |
+-------+---------------------------------+

.------------------.
|  #1. tLogRow_4   |
+----------+-------+
| key      | value |
+----------+-------+
| Category | d     |
+----------+-------+

.-----------------------------------------.
|              #1. tLogRow_7              |
+-------+---------------------------------+
| key   | value                           |
+-------+---------------------------------+
| json  | {"a":{"b":{"c": "d","e": "f"}}} |
| title | XPath on well-formed data       |
+-------+---------------------------------+

.------------------.
|  #1. tLogRow_8   |
+----------+-------+
| key      | value |
+----------+-------+
| Category | d     |
+----------+-------+

[statistics] disconnected

Job TestJsonParseSpecialCharacters ended at 02:43 25/06/2019. [exit code=0]&lt;/PRE&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;You can try playing around with XPath. It may be more forgiving than JSONPath for your malformed data.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I am also attaching the export of my test job if you want to look at the details.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009Lw1C"&gt;TestJsonParseSpecialCharacters.zip&lt;/A&gt;</description>
      <pubDate>Tue, 25 Jun 2019 06:11:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/JSONPath-read-the-dot-as-child-seperator-in-tFileInputJSON/m-p/2298891#M71298</guid>
      <dc:creator>nfz11</dc:creator>
      <dc:date>2019-06-25T06:11:15Z</dc:date>
    </item>
  </channel>
</rss>

