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

UnmarshalExtJSON array fail

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 0.1.0
    • Affects Version/s: 0.0.15
    • Component/s: BSON
    • None
    • Environment:
      Golang 1.10.4 / Golang 1.11
      macOS

      UnmarshalExtJSON fail:

      ~~~
      data := `[ "201810", "201811" ]`

      arr := bson.NewArray()
      err := bson.UnmarshalExtJSON([]byte(data), true, &arr)
      if err != nil

      {     t.Fatal(err) }

      t.Log(arr)
      ~~~

       
      output:
      ~~~
      Cannot read unknown BSON type invalid
      ~~~

      but if data = 'data := `[ "201810" ]` works well
       

       

            Assignee:
            isabella.siu@mongodb.com Isabella Siu (Inactive)
            Reporter:
            liuxiangchao Liu Xiangchao
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: