Skip to content

Add pluggable JSONMapper SPI for custom JSON serialize/deserialize - #79

Draft
ribhav-pahuja wants to merge 1 commit into
FusionAuth:mainfrom
ribhav-pahuja:issue-solve-gh
Draft

Add pluggable JSONMapper SPI for custom JSON serialize/deserialize#79
ribhav-pahuja wants to merge 1 commit into
FusionAuth:mainfrom
ribhav-pahuja:issue-solve-gh

Conversation

@ribhav-pahuja

Copy link
Copy Markdown

Summary

  • Introduce a JSONMapper SPI so applications can plug in a custom JSON library (e.g. Gson) instead of only Jackson.
  • Keep Mapper as the public facade with setMapper / getMapper / resetMapper; default remains JacksonJSONMapper for full backward compatibility.
  • Stop using Jackson JsonNode in JWKS well-known discovery so custom mappers do not need Jackson types.
  • Document the SPI in the README and CHANGES; add tests that a custom mapper is used for serialize/deserialize and encode/decode.

Resolves #6

Test plan

  • mvn test (default JCA + FIPS)
  • CustomJSONMapperTest covers set/reset and encode/decode path
  • Review that domain Jackson annotations remain sufficient for the default mapper
  • Optional follow-up: multi-module packaging / making Jackson optional is intentionally out of scope

Allow applications to replace Jackson via Mapper.setMapper() while keeping
JacksonJSONMapper as the default. Resolves FusionAuth#6.
@ribhav-pahuja
ribhav-pahuja requested a review from a team as a code owner July 21, 2026 18:19
@ribhav-pahuja
ribhav-pahuja marked this pull request as draft July 21, 2026 18:20
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.

Support custom Json deserializer/serializer

1 participant