|
Post by tophercantrell on Jul 7, 2017 21:18:48 GMT
JSON does not different numeric types like "integer" and "float". Everything is just a "number", which can be integers or floats.
Some values in the schema like "PowerConsumedWatts" are definitely floats. Some values in the schema like "MaxPasswordLength" are definitely integers.
The schema definition defines both values as simply "number". Is there an easy way (other than with context) for clients to know how to restrict user inputs to pure integers where appropriate?
|
|
|
Post by mraineri on Jul 10, 2017 12:42:14 GMT
Currently the only way we differentiate this is within the CSDL schemas. The "Type" facet for each of the properties is more granular that what's defined in standard JSON.
For example, PowerConsumedWatts is defined with the type of "Edm.Decimal" in the file "Power_v1.xml", whereas MaxPasswordLength is defined with the type "Edm.Int64" in the file "AccountService_v1.xml".
While this should be addressed for clients that use CSDL schemas, it does not help clients following JSON schemas. I can raise this with the group to see how we want to handle this.
|
|