OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

odata message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: [OASIS Issue Tracker] (ODATA-771) Exponential notation for Edm.Decimal values in JSON payloads


    [ https://issues.oasis-open.org/browse/ODATA-771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=59506#comment-59506 ] 

Michael Pizzo commented on ODATA-771:
-------------------------------------

Both the current Olingo client library and the .NET client library currently break if a decimal value is returned in exponential notation. Both could be relaxed in 4.1, but the fact that they would break reinforces the fact that this is would be a breaking change.

Still, it would be nice to be able to return large values in exponential notation for clients prepared to accept them that way. Adding a way for the client to specify that they are prepared to handle such values would give a way for services to optimize.

Options would be to add either a preference header (which would imply that it was not format specific) or a format parameter (for application/json, that could be used on other formats as appropriate).

> Exponential notation for Edm.Decimal values in JSON payloads
> ------------------------------------------------------------
>
>                 Key: ODATA-771
>                 URL: https://issues.oasis-open.org/browse/ODATA-771
>             Project: OASIS Open Data Protocol (OData) TC
>          Issue Type: Improvement
>          Components: OData JSON Format
>    Affects Versions: V4.0_ERRATA02
>         Environment: [Proposed]
>            Reporter: Ralf Handl
>             Fix For: V4.0_ERRATA03
>
>
> IEEE754 defines the DECFLOAT data type for high-precision decimal arithmetic. They have 16 or 34 decimal digit mantissas and exponents between -383 and +384 or -6143 and +6144.
> The OData JSON Format represents Edm.Decimal values as JSON numbers, and JSON numbers allow exponential notation, so 
> "VeryLittle":1.4e-6143
> should be valid in JSON payloads.



--
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]