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

Implement PackedArray::fromJSON and toJSON methods

    • PHP Drivers
    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      Add support for the same methods as Document convert from and to JSON.

       

      JSON root can be an array: https://stackoverflow.com/a/3833312

      For the Aggregation builder tests, I had to wrap the pipeline array into a document so that I could use `Document::fromJSON` to decode the pipeline: 

      https://github.com/mongodb/mongo-php-builder/blob/d0f0565c8990cc1594d6e6fd8b7debf1f071f106/tests/Builder/PipelineTestCase.php#L22-L27

       

       

            Assignee:
            andreas.braun@mongodb.com Andreas Braun
            Reporter:
            jerome.tamarelle@mongodb.com Jérôme Tamarelle
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: