Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Add a general-purpose `Contextualizable` interface for all handlers to support

未关闭
#9 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
停滞
技术栈
java

调研方向

该 issue 没有指定文件或测试。首先定位现有的上下文化 serializer 和 deserializer,然后跟踪 DatabindContext、DeserializationContext 和 SerializerProvider 如何传递给 handler。完成的标准是确定一个通用 Contextualizable 接口的范围和设计,使其涵盖相关的 handler 类型和 context 类型。

由索引模型根据 Issue 内容生成。

描述

enhancement

(or, if need be, more than one)

Currently a small set of handlers can be "contextualized": that is, called with context within Object Graph, as specified by Property for which handler is related. This set mostly consists of serializers and deserializers.

But there are many other handlers, especially ones added via annotations, that do not get a chance to change their behavior based on context. It seems quite doable to allow use of an add-on interface like, say, Contextualizable that would allow (re)configuration in this way.

One interface may or may not be doable, due to:

  • Difference between reading (deserialize) and writing (serialize) taking different context object (DeserializationContext vs SerializerProvider) -- although, they are both subtypes of DatabindContext so maybe this is not a fundamental problem.
  • Are there other kinds of context beyond property-bound one? Class annotations might just take JavaType?
主要语言
没有语言数据
星标
6
派生
0
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

相似的 Issue

更多 Backend & API Design Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。