百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
B

blueprinter

> 后端框架
开源

适用于 Ruby 的简单、快速和声明式序列化库

1.3K stars0 点赞1 次浏览
访问官网GitHub

工具介绍

适用于 Ruby 的简单、快速和声明式序列化库

最近的组织移动

如果您想序列化一个对象,只需创建一个蓝图。假设您有一个 User 记录,具有以下属性: [:uuid, :email, :first_name, :last_name, :password, :address]。您可以定义一个简单的蓝图,如下所示:


You can also configure other classes to be treated like collections. For example, if you are using Mongoid, you can configure it to treat `Mongoid::Criteria` objects as collections:

ruby Blueprinter.configure do |config| config.custom_array_like_classes = [Mongoid::Criteria] 结束


Or if you wanted it to treat the `Set` class as a collection:

ruby Blueprinter.configure do |config| config.custom_array_like_classes = [Set] 结束


Renaming

You can rename the resulting JSON keys in both fields and associations by using the `name` option.

ruby cla

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Rubyjsonpresenterrailsresource-serializer

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类后端框架
定价开源

> 相关工具

N
Node.js
基于 V8 的 JavaScript 运行时
D
Django
Python 高级 Web 框架
S
Spring Boot
Java 生态主流微服务框架