arangodb / arangodb-php

PHP ODM for ArangoDB
https://www.arangodb.com
Apache License 2.0
182 stars 46 forks source link

HttpResponse uses json_decode($body, true); - changes data with empty objects #264

Open MymmiJ opened 5 years ago

MymmiJ commented 5 years ago

HttpResponse.php using json_decode($body, true); means that empty objects get translated to arrays, which breaks some of our stuff.

We've extended DocumentHandler in order to override the getDocument method, but I think a better solution might be to provide the ability to decide whether an item is decoded into associative arrays or objects, as this was not obvious default behaviour to us.