<?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>question How to check if JSON content is null (or empty)? in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/How-to-check-if-JSON-content-is-null-or-empty/m-p/237344#M199157</link>
    <description>&lt;P&gt;HI All,&lt;/P&gt;&lt;P&gt;does anybody know how to check if the content of the file is null or empty? (JSON for example)?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Nera&lt;/P&gt;</description>
    <pubDate>Wed, 07 Aug 2019 15:26:43 GMT</pubDate>
    <dc:creator>rosa_negra</dc:creator>
    <dc:date>2019-08-07T15:26:43Z</dc:date>
    <item>
      <title>How to check if JSON content is null (or empty)?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-check-if-JSON-content-is-null-or-empty/m-p/237344#M199157</link>
      <description>&lt;P&gt;HI All,&lt;/P&gt;&lt;P&gt;does anybody know how to check if the content of the file is null or empty? (JSON for example)?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Nera&lt;/P&gt;</description>
      <pubDate>Wed, 07 Aug 2019 15:26:43 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-check-if-JSON-content-is-null-or-empty/m-p/237344#M199157</guid>
      <dc:creator>rosa_negra</dc:creator>
      <dc:date>2019-08-07T15:26:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to check if JSON content is null (or empty)?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-check-if-JSON-content-is-null-or-empty/m-p/237345#M199158</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/113932/neramajer.html" nodeid="113932"&gt;@Rosa Negra&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I only have experience concerning JSON.&lt;/P&gt;&lt;P&gt;In my opinion it depends what the content looks like.&lt;/P&gt;&lt;P&gt;If the content of an empty JSON is &lt;STRONG&gt;[ ]&lt;/STRONG&gt; the flowfile disappears when I do a &lt;STRONG&gt;SplitJson&lt;/STRONG&gt; with &lt;STRONG&gt;JsonPath Expression&lt;/STRONG&gt; value &lt;STRONG&gt;$&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;If the content looks like this &lt;STRONG&gt;[ { } ]&lt;/STRONG&gt;  I check with &lt;STRONG&gt;RouteOnContent&lt;/STRONG&gt; on  this (^\[\{\}\]) and filter the file out.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Aug 2019 15:46:10 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-check-if-JSON-content-is-null-or-empty/m-p/237345#M199158</guid>
      <dc:creator>justenji</dc:creator>
      <dc:date>2019-08-07T15:46:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to check if JSON content is null (or empty)?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-check-if-JSON-content-is-null-or-empty/m-p/237346#M199159</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/98289/justenji.html" nodeid="98289" target="_blank"&gt;@ Justen&lt;/A&gt; my JSON file is being converted to null (file size iz 4bytes) after wrong JOLT is applied.&lt;/P&gt;&lt;P&gt;So, when I open the JSON it's litterally 'null'. There are no brackets.. just null. &lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="110204-1565167770957.png" style="width: 118px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/14263iA208797D37E8EF36/image-size/medium?v=v2&amp;amp;px=400" role="button" title="110204-1565167770957.png" alt="110204-1565167770957.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 17 Aug 2019 23:18:04 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-check-if-JSON-content-is-null-or-empty/m-p/237346#M199159</guid>
      <dc:creator>rosa_negra</dc:creator>
      <dc:date>2019-08-17T23:18:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to check if JSON content is null (or empty)?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-check-if-JSON-content-is-null-or-empty/m-p/237347#M199160</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/113932/neramajer.html" nodeid="113932"&gt;@Rosa Negra&lt;/A&gt; &lt;BR /&gt;In this case I would use RouteOnContent to check null and maybe additionally check filesize to be on the safe side.&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 07 Aug 2019 15:55:05 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-check-if-JSON-content-is-null-or-empty/m-p/237347#M199160</guid>
      <dc:creator>justenji</dc:creator>
      <dc:date>2019-08-07T15:55:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to check if JSON content is null (or empty)?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-check-if-JSON-content-is-null-or-empty/m-p/237348#M199161</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/98289/justenji.html" nodeid="98289" target="_blank"&gt;@ Justen&lt;/A&gt; i believe this is the answer:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="110205-1565168722104.png" style="width: 679px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/14262i1766BF1234229AD4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="110205-1565168722104.png" alt="110205-1565168722104.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Sat, 17 Aug 2019 23:17:56 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-check-if-JSON-content-is-null-or-empty/m-p/237348#M199161</guid>
      <dc:creator>rosa_negra</dc:creator>
      <dc:date>2019-08-17T23:17:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to check if JSON content is null (or empty)?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-check-if-JSON-content-is-null-or-empty/m-p/237349#M199162</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/11423"&gt;@Justen&lt;/a&gt; Thanks!&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="110230-1565168780528.png" style="width: 679px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/14261i107AD1D5CA49A7D9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="110230-1565168780528.png" alt="110230-1565168780528.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 17 Aug 2019 23:17:48 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-check-if-JSON-content-is-null-or-empty/m-p/237349#M199162</guid>
      <dc:creator>rosa_negra</dc:creator>
      <dc:date>2019-08-17T23:17:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to check if JSON content is null (or empty)?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-check-if-JSON-content-is-null-or-empty/m-p/237350#M199163</link>
      <description>&lt;P&gt;The above question and the entire response thread below were originally posted in the &lt;A href="https://community.hortonworks.com/spaces/101/index.html"&gt;Community Help&lt;/A&gt; track. On Wed Aug 7 18:53 UTC 2019, a member of the HCC moderation staff moved it to the &lt;A href="https://community.hortonworks.com/spaces/63/data-flow-track.html"&gt;Data Ingestion &amp;amp; Streaming &lt;/A&gt; track. The &lt;EM&gt;Community Help Track&lt;/EM&gt; is intended for questions about using the HCC site itself.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2019 01:53:52 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-check-if-JSON-content-is-null-or-empty/m-p/237350#M199163</guid>
      <dc:creator>ask_bill_brooks</dc:creator>
      <dc:date>2019-08-08T01:53:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to check if JSON content is null (or empty)?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-check-if-JSON-content-is-null-or-empty/m-p/301583#M220753</link>
      <description>&lt;P&gt;&lt;SPAN&gt;To &lt;A href="https://appdividend.com/2020/08/17/how-to-check-null-value-in-javascript/" target="_blank" rel="noopener"&gt;check null in JavaScript&lt;/A&gt;, use triple equals operator(===) or Object is() method. If you want to use Object.is() method then you two arguments.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1)&amp;nbsp; Pass your variable value with a null value.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2) The null value itself.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;To find the difference between null and undefined, use the triple equality operator or Object is() method.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;To loosely check if the variable is null, use a double equality operator(==). The double equality operator can not tell the difference between null and undefined, so it counts as same. So if you want to strict check, then don't use a double equality operator. It will lead to misconclusion.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Aug 2020 10:30:06 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-check-if-JSON-content-is-null-or-empty/m-p/301583#M220753</guid>
      <dc:creator>krunal_lathiya</dc:creator>
      <dc:date>2020-08-17T10:30:06Z</dc:date>
    </item>
  </channel>
</rss>

