Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-725

Numbers that look like integers but are too big should be treated as doubles

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 0.2.0
    • Affects Version/s: None
    • Component/s: JSON & ExtJSON
    • None

      The number I came across was this: "8005332285744496613785600"

       

      this fails:

      strconv.ParseInt("8005332285744496613785600", 10, 64) 

      but this succeeds:

      strconv.ParseFloat("8005332285744496613785600", 64) 

      We should try the first and, if it fails, fallback and try the second.

            Assignee:
            craig.wilson@mongodb.com Craig Wilson
            Reporter:
            craig.wilson@mongodb.com Craig Wilson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: