mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-23 14:29:31 +00:00
19 lines
379 B
Ruby
19 lines
379 B
Ruby
module ActiveModel
|
|
class Serializer
|
|
class Adapter
|
|
class FlattenJson < Json
|
|
def serializable_hash(options = {})
|
|
super.each_value.first
|
|
end
|
|
|
|
private
|
|
|
|
# no-op: FlattenJson adapter does not include meta data, because it does not support root.
|
|
def include_meta(json)
|
|
json
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|