Lucas Hosseini
Lucas Hosseini
Hi @rovermicrover – thanks for the PR. Would you mind splitting this into two? (One with the splat change, and one with the marshalling) I'll merge the splat one immediately,...
The splat part was clearly a bug. > Next once that was done the JSON result had instead of data being an array of objects, it was an array of...
@rovermicrover See my above edits. Would you mind issuing a PR with the mentioned fix?
Hi @rovermicrover – the relevant part for ActiveSupport's modification of the JSON gem behavior is there: https://github.com/rails/rails/blob/56c1326abb11ed275f04b6e0592ca66975e37f24/activesupport/lib/active_support/core_ext/object/json.rb#L23 As you can see, calling `JSON.generate` will prevent the ActiveSupport overrides to kick...
You may want to give https://github.com/jsonapi-rb/jsonapi-rails/pull/70 a try.
Oh I see. I’ll try to come up with a rails 4 compatible fix – do not hesitate if you have any suggestions in the meantime. Also,I’d like to setup...
> In this case we have two different objects with the same `jsonapi_type` and `jsonapi_id` but with slightly different behavior. This does not seem in line with [the spec](https://jsonapi.org/format/#document-resource-object-identification): >...
I'm up for supporting this if/when it gets into the spec. Note that in your case, you can always pre-compute the depth of the tree and build an adequate include...
The kind of caching implemented here is not attributes caching but fragment caching, as the main bottleneck usually is generating the actual json. Attributes caching is quite easy to implement...
Just offering my two cents and some context here: ----- > The fact that "relationships" is present when I didn't request anything in the include param is a little weird,...