Uploaded image for project: 'Apache Knox'
  1. Apache Knox
  2. KNOX-378

Knox rewrites numbers in JSON to engineering notation

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • None
    • 0.6.0
    • Server
    • None

    Description

      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

      {
      	"apps":{
      		"app":[
      			{
      				"id":"one",
      				"progress":100.0,
      				"startedTime":1399975176760
      			}
      		]
      	}
      }
      

      Rewritten JSON

      {
      	"apps":{
      		"app":[
      			{
      				"id":"one",
      				"progress":1E+2,
      				"startedTime":1.39997517676E+12
      			}
      		]
      	}
      }
      

      Attachments

        Activity

          People

            kminder Kevin Minder
            vtkhir@hortonworks.com Vladimir Tkhir
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: