Skip to content

feat: extract JsonDecoder interface to decouple graphql from Jackson#3240

Merged
velo merged 1 commit intomasterfrom
feature/json-decoder-interface
Feb 26, 2026
Merged

feat: extract JsonDecoder interface to decouple graphql from Jackson#3240
velo merged 1 commit intomasterfrom
feature/json-decoder-interface

Conversation

@velo
Copy link
Copy Markdown
Member

@velo velo commented Feb 25, 2026

Summary

  • Introduces feign.codec.JsonDecoder interface in feign-core that extends Decoder with an additional decode(Object, Type) method for in-memory object conversion
  • Provides implementations for all JSON library modules: Jackson, Jackson 3, Jackson Jr, Gson, Moshi, Fastjson2, and JSON-java (org.json)
  • Rewrites GraphqlDecoder to accept a single JsonDecoder instead of directly depending on ObjectMapper, removing the jackson-databind compile dependency from the graphql module
  • The JsonDecoder.decode(Object, Type) method enables direct Map-to-target-type conversion, avoiding the previous serialize-then-deserialize round-trip

All new types are annotated with @Experimental.

Test plan

  • All existing graphql tests pass with JacksonJsonDecoder
  • All existing tests in core, jackson, jackson3, jackson-jr, gson, moshi, fastjson2, json modules pass
  • Verify CI passes on all supported JDK versions

🤖 Generated with Claude Code

@velo velo force-pushed the feature/json-decoder-interface branch from 703ab3f to 1d307ce Compare February 25, 2026 23:16
@velo velo merged commit 8176b9f into master Feb 26, 2026
4 checks passed
@velo velo deleted the feature/json-decoder-interface branch February 26, 2026 00:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant