Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Turn off json values rounding in NiFi

avatar
New Contributor

Hello,

 

I have NiFi flow with EvaluateJsonPath that read a content of FlowFile with json to Data attribute. But numeric values of json are changed, i.e.:

GenerateFlowFile
{
"Amount1": 999999999999999999.99,
"Amount2": 999999999.99
}

->
EvaluateJsonPath
Data $
->
Data
{"Amount1":1.0E18,"Amount2":9.9999999999E8}

How do I stop NiFi from rounding off and changing json numbers? Tested on NiFi 1.15/1.19.

Thanks.

1 REPLY 1

avatar
Super Collaborator

I don't see EvaluateJsonPath give options so it might be something you'd have to handle on your own...personally I'd do it via a Groovy scripted processor for greater control and performance.