You can specify that serializers use the lower-camel key format at the config, class or instance level.
1234567891011 rubyActiveModel::Serializer.setup do |config| config.key_format :lower_camelendclass BlogLowerCamelSerializer format_keys :lower_camelendBlogSerializer.new(object, key_format: :lower_camel)
Relevant to issue #398. Pull request #436 also offered a solution for changing the key format but that approach is now in conflict with head/master.
该提问来源于开源项目:rails-api/active_model_serializers
-nishu-trantor Please open a new issue if you're looking for help or to help others. Commenting on an issue closed 3 years ago in general is considered 'necromancy', and should only be done with care. In this case, I believe the PR refers to a version which is a long distant cousin of yours.