Skip to content
This repository was archived by the owner on Apr 3, 2019. It is now read-only.

Conversation

@prantlf
Copy link
Contributor

@prantlf prantlf commented Dec 28, 2014

An attempt to fix #5

Convert arrays of digits to strings before parsing a number from them

Change the parsing order to double -> decimal -> integer to capture the longest tokens first

Parse decimals and doubles into strings according to the OData specification for the primitive types

Move byte, decimal and double below int32 to prefer the int32 fo numbers;
this makes the whole decimal numbers and byte and sbyte numbers unreachable
rules, I am afraid

Join the array of digits into a string before parsing an integer number from it
Move decimal, double and single before integer otherwise integer would be
preferred and the decimal point would be handled as a dot for the next token;
byte and sbyte are still unreachable, I am afraid

Parse the decimal number into a string according to the OData specification
… single one

Move decimal below double otherwise decimal would be preferred
and the 'e' before the exponent would be considered for the next token

Parse the double into a string according to the OData specification
Move boolean below sbyte to let integer-like tokens parsed earlier, otherwise
the staring 1 would be caught by the boolean and the other digits would be
handled as another token
jfromaniello added a commit that referenced this pull request Jan 5, 2015
@jfromaniello jfromaniello merged commit 9105658 into auth0:master Jan 5, 2015
@jfromaniello
Copy link
Member

Very well done! Thank you very much and sorry for the long delay

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Numbers

2 participants