Vladimir Tkhir created KNOX-378:
-----------------------------------
Summary: Knox rewrites numbers in JSON to engineering notation
Key: KNOX-378
URL: https://issues.apache.org/jira/browse/KNOX-378
Project: Apache Knox
Issue Type: Bug
Components: Server
Reporter: Vladimir Tkhir
Fix For: 0.5.0
Attachments: KNOX-378_unit_test_to_reproduce.patch
Converting to engineering notation occurs only when buffering has been
configured in the rewrite rules. It's related to usage of
BigDecimal.stripTrailingZeros() in the
com.fasterxml.jackson.databind.node.JsonNodeFactory.numberNode(BigDecimal v) by
default.
For example, original JSON
{code}
{
"apps":{
"app":[
{
"id":"one",
"progress":100.0,
"startedTime":1399975176760
}
]
}
}
{code}
Rewritten JSON
{code}
{
"apps":{
"app":[
{
"id":"one",
"progress":1E+2,
"startedTime":1.39997517676E+12
}
]
}
}
{code}
--
This message was sent by Atlassian JIRA
(v6.2#6252)