Project

General

Profile

Bug #1413

Utils::JsonWrapper should allow integer overloading to float

Added by Rogers, Chris over 7 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
common_cpp
Target version:
Start date:
11 February 2014
Due date:
% Done:

100%

Estimated time:
Workflow:
New Issue

Description

It can be a bit confusing to get an error when one attempts to interpret an integer ni e.g. configuration file as a float. Probably JsonWrapper is being too strict here.

#1

Updated by Rogers, Chris over 7 years ago

Implemented in rogers/1413 branch, will put it through test. We now allow (JsonWrapper):

  1. Uint -> int
  2. Uint, int -> real
  3. anything -> anyType
  4. anyType -> anything

Note 1-3 are guaranteed to be safe, 4 may make a Json error (which results in a dump). Maybe I should disallow 4?

#2

Updated by Rogers, Chris over 7 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

Merged in r708.

I didn't disallow 4.

#3

Updated by Rajaram, Durga over 7 years ago

  • Target version changed from Future MAUS release to MAUS-v0.8.4

Also available in: Atom PDF