Benjamin Fleischer
Benjamin Fleischer
@kurko would be fair to say that > Given the attribute sent is data.attributes.metadata: {"order_id": 123}, That AMS shouldn't necessarily process the attribute values when they are 'objects' i.e. hashes....
Also, I want to note that the transformation boundary is in the adapter serializable_hash method as `self.class.transform_key_casing!(document, instance_options)` where document is a hash
> key_transformation: :some_method I think that's a good option to pass in. Only question is how it would propagate. Right now we key transform the full document. I think it...
(if anyone wants to review https://github.com/rails-api/active_model_serializers/pull/2026 and help me bring it home, that'd be great. )
@InteNs You can use the instance method `json_key` and/or a `root` option as described in https://github.com/rails-api/active_model_serializers/blob/0-10-stable/lib/active_model/serializer.rb#L371-L374
You linked to the collection serializer. is the snapshot an association?
@InteNs the collection serializer is meant to facilitate serialization items in a collection. It doesn't itself have a type. The type comes from the items being serialized. I'd advise not...
@aliaporci Thanks so much for the writeup and link! I'm kind of surprised this issue hasn't come up before. This must have been a problem for all sorts of people....
we'll need a before/after benchmark of this too. Do you feel comfortable running `bin/bench` locally on master and on your branch?