UnmarshalExtJSON array fail

XMLWordPrintableJSON

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

      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 (Inactive)
            Reporter:
            Liu Xiangchao
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: