[ 
https://issues.apache.org/jira/browse/NIFI-2359?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16441474#comment-16441474
 ] 

Matt Burgess commented on NIFI-2359:
------------------------------------

What about the case where you only want to convert someĀ strings into numbers 
but not all of them, such as zip codes?

There is a workaround if you know which attributes will be written to JSON: 
After AttributesToJSON you can use ConvertRecord with a JsonTreeReader (with a 
schema specifying all fields as strings) and a JsonRecordSetWriter (with the 
desired output schema).

> Improve AttributesToJSON so it can output booleans, numbers and datetimes
> -------------------------------------------------------------------------
>
>                 Key: NIFI-2359
>                 URL: https://issues.apache.org/jira/browse/NIFI-2359
>             Project: Apache NiFi
>          Issue Type: Improvement
>    Affects Versions: 0.7.0
>            Reporter: Tristan Morris
>            Priority: Minor
>              Labels: beginner
>         Attachments: 
> 0001-NIFI-2359-Added-support-to-AttributesToJSON-to-conve.patch
>
>
> The AttributesToJSON processor only outputs string content 
> {
>    "isAwesome": "true"
> }
> Rather than 
> {
>   "isAwesome": true
> }
> It would be useful for AttributesToJSON to output json native types like 
> booleans, numbers and datetimes



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to