Uploaded image for project: 'PHP Driver: Extension'
  1. PHP Driver: Extension
  2. PHPC-561

MongoDB\BSON\ObjectID should be encoded correctly by json_encode

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 1.1.0
    • Component/s: None
    • None
    • Environment:
      Windows 10; PHP 7.0.2; XAMPP 3.2.2; php_mongodb 1.1.2

      When encoding a MongoDB\BSON\ObjectID object with json_encode the output is an empty literal ({})

      This makes my applications difficult as one has to manually convert every ObjectID to string before passing to json_encode.

      ObjectID (and possibly other Mongo types) should be encodable in json

            Assignee:
            Unassigned Unassigned
            Reporter:
            mr.letrunghieu Nick Le
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: