<?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 Re: Specifying Datatype to JSON Key-Values while doing an Attribute To JSON conversion with NiFi in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Specifying-Datatype-to-JSON-Key-Values-while-doing-an/m-p/152897#M115362</link>
    <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/363/bbende.html" nodeid="363"&gt;@Bryan Bende&lt;/A&gt; : Thanks for pointing the Jira. &lt;/P&gt;</description>
    <pubDate>Tue, 31 Jan 2017 02:35:40 GMT</pubDate>
    <dc:creator>arunak</dc:creator>
    <dc:date>2017-01-31T02:35:40Z</dc:date>
    <item>
      <title>Specifying Datatype to JSON Key-Values while doing an Attribute To JSON conversion with NiFi</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Specifying-Datatype-to-JSON-Key-Values-while-doing-an/m-p/152895#M115360</link>
      <description>&lt;P&gt;
	Hi All, &lt;/P&gt;&lt;P&gt;	
	I am doing an attribute to json conversion using NiFi AttributesToJSON Processor. What is observed is that any key value pair is mapped to String datatype in the resultant JSON, which I believe is the intended behavior.&lt;/P&gt;&lt;P&gt;
	However, is there any known approaches to specify the datatype for a Key-Value pair? Currently I am employing an ExecuteScript processor once the JSON conversion is done to convert the "String" data type to whatever datatype I want the key-value to be in.&lt;/P&gt;&lt;P&gt;
	Are there other better approaches?&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jan 2017 01:36:25 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Specifying-Datatype-to-JSON-Key-Values-while-doing-an/m-p/152895#M115360</guid>
      <dc:creator>arunak</dc:creator>
      <dc:date>2017-01-31T01:36:25Z</dc:date>
    </item>
    <item>
      <title>Re: Specifying Datatype to JSON Key-Values while doing an Attribute To JSON conversion with NiFi</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Specifying-Datatype-to-JSON-Key-Values-while-doing-an/m-p/152896#M115361</link>
      <description>&lt;P&gt;There is a JIRA to improve AttributesToJson to support types besides strings:&lt;/P&gt;&lt;P&gt;&lt;A href="https://issues.apache.org/jira/browse/NIFI-2359" target="_blank"&gt;https://issues.apache.org/jira/browse/NIFI-2359&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Currently all flow file attributes are stored as strings so there needs to be a way for the user to indicate the type for each attribute. For example, if attribute "foo" has a value of "true" we don't really know if the user wants true as a boolean or true as a string.&lt;/P&gt;&lt;P&gt; A convention could be created where each attribute could have a corresponding type attribute so something like:&lt;/P&gt;&lt;P&gt;attr1 = true&lt;/P&gt;&lt;P&gt;attr1.type = boolean&lt;/P&gt;&lt;P&gt;attr2 = true&lt;/P&gt;&lt;P&gt;attr2.type = string&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jan 2017 02:20:06 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Specifying-Datatype-to-JSON-Key-Values-while-doing-an/m-p/152896#M115361</guid>
      <dc:creator>bbende</dc:creator>
      <dc:date>2017-01-31T02:20:06Z</dc:date>
    </item>
    <item>
      <title>Re: Specifying Datatype to JSON Key-Values while doing an Attribute To JSON conversion with NiFi</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Specifying-Datatype-to-JSON-Key-Values-while-doing-an/m-p/152897#M115362</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/363/bbende.html" nodeid="363"&gt;@Bryan Bende&lt;/A&gt; : Thanks for pointing the Jira. &lt;/P&gt;</description>
      <pubDate>Tue, 31 Jan 2017 02:35:40 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Specifying-Datatype-to-JSON-Key-Values-while-doing-an/m-p/152897#M115362</guid>
      <dc:creator>arunak</dc:creator>
      <dc:date>2017-01-31T02:35:40Z</dc:date>
    </item>
  </channel>
</rss>

