You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@knox.apache.org by "Larry McCay (JIRA)" <ji...@apache.org> on 2014/09/25 21:53:33 UTC

[jira] [Updated] (KNOX-378) Knox rewrites numbers in JSON to engineering notation

     [ https://issues.apache.org/jira/browse/KNOX-378?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Larry McCay updated KNOX-378:
-----------------------------
    Fix Version/s:     (was: 0.5.0)
                   0.6.0

> 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
>            Priority: Critical
>             Fix For: 0.6.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.3.4#6332)