当前位置 : 主页 > 网络编程 > 其它编程 >

SupportlowerCamelkeyformat

来源:互联网 收集:自由互联 发布时间:2023-07-02
Youcanspecifythatserializersusethelower-camelkeyformatattheconfig,classor You can specify that serializers use the lower-camel key format at the config, class or instance level. 1234567891011 rubyActiveModel::Serializer.setup do |config| 
Youcanspecifythatserializersusethelower-camelkeyformatattheconfig,classor

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.

   

【感谢龙石为本站提供api管理平台 http://www.longshidata.com/pages/apigateway.html】
上一篇:PHP记住密码功能实现例子
下一篇:没有了
网友评论