← Prev in month ← Prev in thread

[OASIS Issue Tracker] (ODATA-841) Representation of Precision and Scale

From
OASIS Issues Tracker <>
Date
2015-09-09T13:08:41+00:00
ID
Thread
[OASIS Issue Tracker] (ODATA-841) Representation of Precision and Scale
Ralf Handl created ODATA-841:
--------------------------------

             Summary: Representation of Precision and Scale
                 Key: ODATA-841
                 URL: https://issues.oasis-open.org/browse/ODATA-841
             Project: OASIS Open Data Protocol (OData) TC
          Issue Type: Bug
          Components: OData JSON CSDL
    Affects Versions: V4.01_WD01
            Reporter: Ralf Handl
             Fix For: V4.01_WD01


JSON Schema offers the keywords minimum, maximum, and multipleOf for fine-tuning the value range of numeric properties.

While it is possible to translate Precision="5" and Scale="2" into
- multipleOf: 1e-2
- minimum: -999.99
- maximum: 999.99
it is rather hard for an OData client to re-engineer the precision and scale

Similar for temporal values: here Precision="7" would have to be -translated into a regular expression
- "pattern":"(^[^.]*$|[.][0-9]{1,7}$)"

We could add the original scale and precision as extension keywords.

And we could additonally opt to omit the rather cryptic JSON Schema representation that would only benefit JSON Schema validators.




--
This message was sent by Atlassian JIRA
(v6.2.2#6258)
← Prev in month ← Prev in thread