Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: json component serializer #856

Merged
merged 14 commits into from
Jun 7, 2023
Merged

Conversation

kezz
Copy link
Member

@kezz kezz commented Jan 10, 2023

This PR adds a new module providing an implementation agnostic JSON serializer. The intention behind this PR is to allow platforms to swap between or use alternative implementations of a json serializer (see #839) whilst still allowing consumers of the platform to work regardless of the backing impl.

work that needs doing:

  • decide whether we need to bother with legacy stuff (legacy nbt serializer too?)
  • common tests for other serializers to use
  • common jmh benchmarks for other serializers to use
  • better error message for missing impl
  • docs for this (also in javadocs)
  • common builder for JSON serializers
  • finish moving text-serializer-gson-legacy-impl out to a json version, remove the old one from the bom, and stop publishing it with 4.15.0 (anyone still using it can just depend on an old version)
  • [ ] do we want a common flavour of the Provider services that normal serializers have, intended to be implemented by platforms? not worth doing in this first revision

@kezz kezz added this to the 4.13.0 milestone Jan 10, 2023
@kezz kezz force-pushed the feature/text-serializer-json branch from 82b4591 to 8c3fe5b Compare January 12, 2023 18:26
@zml2008
Copy link
Member

zml2008 commented Jan 13, 2023

I think it's worthwhile to port the LegacyHoverEventSerializer and text-serializer-gson-legacy-impl over to JsonComponentSerializer -- it doesn't have any direct gson deps.

With options, I think it's worthwhile to have a common builder interface exposed as well -- since there are a few configurable elements.

I'm not sure what your goals were with the Fallback interface were -- I don't see it having any practical effect since you already orElse to the fallback without needing service discovery.

@zml2008 zml2008 removed this from the 4.13.0 milestone Mar 14, 2023
@zml2008 zml2008 added this to the 4.14.0 milestone Apr 25, 2023
@zml2008 zml2008 force-pushed the feature/text-serializer-json branch from ee315f8 to 8d02986 Compare May 15, 2023 00:42
@zml2008 zml2008 self-assigned this Jun 7, 2023
@zml2008 zml2008 added this pull request to the merge queue Jun 7, 2023
Merged via the queue into main/4 with commit 2d14cdc Jun 7, 2023
@zml2008 zml2008 deleted the feature/text-serializer-json branch June 7, 2023 05:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants