[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: [OASIS Issue Tracker] (ODATA-920) Specify overflow for int data types (-INF, INF, NaN)
[ https://issues.oasis-open.org/browse/ODATA-920?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=63808#comment-63808 ] Michael Pizzo commented on ODATA-920: ------------------------------------- Capturing Hubert's idea of substituting the overflow value within the array with an object containing the annotation.. i.e.; "numbers" : [ 1, 2, {"@odata.numericOverflow":"-INF"}, 4 ] or, more generally, accounting for any arbitrary annotation with or without a value: "numbers" : [ 1, 2, { "value":3, "@my.comment":"this is just a guess"}, }, 4 ] Note that, in JSON Schema, we would have to describe this as an array of numeric values or objects, using either a generic object, an "annotatedPrimitive" object that allowed an optional primitive value and zero or more annotations, or a specific "annotatedNumeric" object that allowed an (optional) numeric value and zero or more annotations. i.e.; "type": "array", "items": [ { "type": "numeric", "format": "decimal" }, "annotatableDecimal" ], where "annotatableDecimal is defined something like: "annotatableDecimal" : { "type": "object", "properties": { "value": { "type": "number", "format": "decimal" } }, "patternProperties": { "^([a-zA-Z_][a-zA-Z0-9_]*)?@([a-zA-Z_][a-zA-Z0-9_.]*\\.)?[a-zA-Z_][a-zA-Z0-9_.]+$" : { "type": ["array", "boolean", "number", "null", "object", "string"], "description": "An annotation on the primitive value" } } } For annotating a collection within a collection of collections, this would presumably look something like: "cells": [ [ {"foo":1,"bar":1}, {"foo":2,"bar":2} ], { "value": [ {"foo":3,"bar":3}, {"foo":4,"bar":4} ], "@my.annotation":"myannotationvalue" } ] > Specify overflow for int data types (-INF, INF, NaN) > ---------------------------------------------------- > > Key: ODATA-920 > URL: https://issues.oasis-open.org/browse/ODATA-920 > Project: OASIS Open Data Protocol (OData) TC > Issue Type: Improvement > Components: OData JSON Format, OData URL Conventions > Affects Versions: V4.0_OS > Reporter: Martin Zurmuehl > Fix For: V4.01_WD01 > > > See ODATA-785 for a description of the issue --> Comments Section. -- This message was sent by Atlassian JIRA (v6.2.2#6258)
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]