[DDC-2910] JSON Pointer and JSON Patch syntax support Created: 12/Jan/14 Updated: 12/Jan/14 Resolved: 12/Jan/14
|Project:||Doctrine 2 - ORM|
|Component/s:||Mapping Drivers, Tools|
|Reporter:||Kévin Dunglas||Assignee:||Marco Pivetta|
|Labels:||hateoas, json, jsonapi, jsonpatch, jsonpointer, rest, rfc|
JSON Pointer and JSON Patch are useful to create Hypermedia REST API (HATEOAS).
The use case for the JSON pointer syntax is to access entity properties through an object graph.
And for JSON Patch it's to modify a whole object graph.
In order to add some security, I also plan to create a new annotation to set access permissions on properties.
I'd like some feedback before starting the implementation:
|Comment by Marco Pivetta [ 12/Jan/14 ]|
This idea is out of scope for ORM.
There's different projects you may look at:
These are obviously all trying to integrate with third party components, but the problem of REST APIs is out of the scope of persistence.
And yes, the example API you've shown here is awesome - just out of scope for this project
|Comment by Kévin Dunglas [ 12/Jan/14 ]|
Thanks for your reply.
I'm aware of these projects and in touch with people building HATEOAS (as a Symfony developper, other projects you mention are awesome but not fit my use case): https://github.com/willdurand/Hateoas/issues/130
It seems that it's not easy to implement JSON API / Patch /Pointer in this kind of libraries but I'm keeping an eye on it. Maybe that a tiny library focusing on JSON stuffs support (instead of all hypermedia related things like HATEOAS) can be a good start (and maybe that some code can be shared between projects).