Closed (fixed)
Project:
JSON:API Extras
Version:
8.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
5 Sep 2017 at 09:26 UTC
Updated:
4 May 2018 at 07:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
garphyFirst attempt of doing this.
Comment #4
garphyThis is an updated patch for 2.x branch.
Comment #6
garphyComment #7
e0ipsoKicking off tests.
Comment #8
logickal commentedWe're doing the exact same thing in a custom enhancer - +1 for including this functionality in the upstream module. One thing of note, at least in our case, the json could also be an array so for this to be one-size-fits-all, I'd suggest adding that to the getOutputJsonSchema.
Comment #9
logickal commented@garphy @e0ipso Another question - is there a general preference to using
\Symfony\Component\Serializer\SerializerInterfaceoverDrupal\Component\serialization\Json?Comment #10
simeI upgraded to the latest jsonapi_extras and the enhancers changed a bit - I got stuck on validator config. So I moved the my enhancer into a standalone module, so I could nurse it along and see how this issue progresses.
https://gist.github.com/simesy/fb44c48fcab0725b019b0fd6dc7e1fb2 in case anyone needs something urgently.
Comment #11
garphy@logickal, I chose to go with
SerializerInterfaceas it seemed to be the coherent with what jsonapi mostly uses itself but it seems that it also useJson::decode()directly in some places.@e0ipso, any opinion ?
Comment #12
logickal commentedHere's a quick re-roll to support arrays.
Comment #13
logickal commentedAnd for the sake of discussion, here is the code that we are running on our end in our custom enhancer, rolled onto the original patch.
Comment #14
e0ipsoThis is a c&p error.
I will fix this issue on commit. Thanks everyone for the contribution!
Comment #16
e0ipsoThanks for your relentless contributions.