Project

General

Profile

Bug #1604

Json::Value print double can make dodgy json

Added by Pidcott, Celeste over 7 years ago.

Status:
Open
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
13 January 2015
Due date:
% Done:

0%

Estimated time:
Workflow:
New Issue

Description

Chris Rogers and Celeste Pidcott:

When Calling DoubleProcessor::CppToJson, we sometimes get a json value which is very close to an integer. When printing to text file, this makes a double like 1., note nothing after the decimal place. When trying to read this in using python json library, it throws an exception. I upload an example after processing. The error is at character 1044934

2074,"cluster":{"$ref":"#recon_events/1/sci_fi_event/clusters/5"},"covariance":[-898426.4006927561,-20999963789.80033,70879352090.91380,-211440938112.4572,18126403608.70715,150693348352172.0,-917424761051137.5,\
2706812574100254.,\ <---- ERROR HERE
-2583373925.939164,451922030155724.9,-758240545735095.5,23181340


Files

rogers_hack.json (1.56 MB) rogers_hack.json Pidcott, Celeste, 13 January 2015 14:14

No data to display

Also available in: Atom PDF