Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-402

C Driver: appending undefined instead of null

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      There is a bug in the C driver where it appends undefined instead of null in bson_append_iter (https://github.com/mongodb/libbson/blob/master/src/bson/bson.c#L1245-L1247):

      case BSON_TYPE_NULL:
         ret = bson_append_undefined (bson, key, key_length);
         break;
      

      A similar append in bson_append_value at https://github.com/mongodb/libbson/blob/master/src/bson/bson.c#L1723-L1725 seems to be correctly implemented.

            Assignee:
            christian.hergert@10gen.com Christian Hergert
            Reporter:
            anil.kumar Anil Kumar
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: