You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by "Jeremy Mitchell (JIRA)" <ji...@apache.org> on 2017/01/18 18:02:26 UTC

[jira] [Created] (TC-102) API changes to reflect true datatypes

Jeremy Mitchell created TC-102:
----------------------------------

             Summary: API changes to reflect true datatypes
                 Key: TC-102
                 URL: https://issues.apache.org/jira/browse/TC-102
             Project: Traffic Control
          Issue Type: Improvement
          Components: Traffic Ops, Traffic Ops API
    Affects Versions: 2.0.0
            Reporter: Jeremy Mitchell
             Fix For: 2.0.0


With the move from MySQL to Postgres, the API will reflect the true data types of each value as represented in the database. For example, the Postgres version of the TO database now has boolean columns (rather than using smallint). These values should be represented in the API as booleans (true|false) as opposed to "0"|"1" as before.

Also, in the old MySQL TO, ints or numbers were represented as "age":"23" in the API. That should change to "age":23

These are the datatypes available in json and they should be taken advantage of when necessary:

Boolean:  true|false
String: double-quoted Unicode with backslash escaping
Number: double- precision floating-point format in JavaScript
Array: an ordered sequence of values
Object: an unordered collection of key:value pairs
Null

I'm creating this issue as a catch-all for any changes required to reflect the true data types in the api.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)