You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@knox.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2015/03/02 21:45:05 UTC
[jira] [Commented] (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:comment-tabpanel&focusedCommentId=14343728#comment-14343728 ]
ASF subversion and git services commented on KNOX-378:
------------------------------------------------------
Commit 0a4fb9a7d41a1e8a6169f4c2ad8ebd8915cc306b in knox's branch refs/heads/master from [~kevin.minder]
[ https://git-wip-us.apache.org/repos/asf?p=knox.git;h=0a4fb9a ]
KNOX-378: Knox rewrites numbers in JSON to engineering notation
> 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)