Skip to content

[F] Fix import/export disparity, fix jackson3 export isSomething serialization bug, add tests - #237

Merged
hykilpikonna merged 3 commits into
v1-devfrom
fix-import-v2
Aug 5, 2026
Merged

[F] Fix import/export disparity, fix jackson3 export isSomething serialization bug, add tests#237
hykilpikonna merged 3 commits into
v1-devfrom
fix-import-v2

Conversation

@hykilpikonna

Copy link
Copy Markdown
Collaborator

No description provided.

@hykilpikonna
hykilpikonna marked this pull request as ready for review August 5, 2026 19:12
@hykilpikonna
hykilpikonna requested a lite review from Copilot August 5, 2026 19:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR upgrades and aligns JSON serialization/deserialization behavior around Jackson 3, with a focus on ensuring exported game backup JSON can be re-imported without data changes and fixing Spring Boot 4/Jackson 3 boolean is* property serialization in HTTP responses. It also adjusts integration-style tests so they鈥檙e automatically skipped when no live server is running.

Changes:

  • Introduces a shared Jackson 3 JsonMapper Spring bean (with Kotlin module) and updates serialization/deserialization helpers to restore correct is* boolean property naming and improve date-time handling (including legacy array formats).
  • Migrates various mappers/serializers/handlers to Jackson 3 (tools.jackson.*) APIs and exception types.
  • Adds import/export parity and date parsing regression tests; gates live-server integration tests via liveTest(...) so CI won鈥檛 fail when no server is available.

Reviewed changes

Copilot reviewed 21 out of 22 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/test/kotlin/test/WaccaTest.kt Converts integration tests to liveTest(...) so they鈥檙e skipped when no live server is listening.
src/test/kotlin/test/Mai2Test.kt Same live-server gating conversion for Mai2 integration tests.
src/test/kotlin/test/ImportExportParityTest.kt New round-trip JSON parity tests for CHUNITHM/maimai DX/ONGEKI exports (including LocalDateTime text serialization checks).
src/test/kotlin/test/Chu3ImportJsonTest.kt Adds regression coverage for legacy LocalDateTime array imports and updates expected Jackson 3 exception/message behavior.
src/test/kotlin/ext/TestExt.kt Adds LIVE_SERVER_AVAILABLE probe and liveTest(...) helper for conditional test registration.
src/main/java/icu/samnyan/aqua/sega/util/Serializers.kt Migrates custom serializers/deserializers to Jackson 3 APIs and token access patterns.
src/main/java/icu/samnyan/aqua/sega/util/GameDataService.kt Updates TypeReference import to Jackson 3 package.
src/main/java/icu/samnyan/aqua/sega/util/BasicMapper.kt Rebuilds BASIC/STRING mappers using Jackson 3 builder APIs and updated enum feature configuration.
src/main/java/icu/samnyan/aqua/sega/ongeki/model/OngekiUserEntities.kt Updates databind annotation import to Jackson 3.
src/main/java/icu/samnyan/aqua/sega/maimai2/model/userdata/UserEntities.kt Updates custom LocalDateTime serializer to Jackson 3 serializer/context types.
src/main/java/icu/samnyan/aqua/sega/maimai2/model/userdata/Mai2UserDetail.kt Updates databind annotation import to Jackson 3.
src/main/java/icu/samnyan/aqua/sega/maimai2/handler/UpsertUserAllHandler.kt Updates thrown exception type to Jackson 3 base exception.
src/main/java/icu/samnyan/aqua/sega/general/BaseHandler.kt Updates handler exception contract to Jackson 3 base exception.
src/main/java/icu/samnyan/aqua/sega/diva/util/DivaUtils.kt Updates serializer provider/context types for Jackson 3.
src/main/java/icu/samnyan/aqua/sega/diva/util/DivaMapper.kt Moves module registration into Jackson 3 builder flow and updates imports.
src/main/java/icu/samnyan/aqua/sega/chusan/model/userdata/UserMusicDetail.kt Updates databind annotation import to Jackson 3.
src/main/java/icu/samnyan/aqua/sega/chusan/model/userdata/Chu3UserData.kt Enhances flexible date-time deserialization to accept legacy arrays and improves mismatch error reporting under Jackson 3.
src/main/java/icu/samnyan/aqua/sega/cardmaker/CardMakerControllerAdvice.kt Updates mapper instantiation/imports to Jackson 3 JsonMapper.
src/main/java/icu/samnyan/aqua/net/games/ImportHelper.kt Updates custom module deserializer base type and switches mapper cloning to Jackson 3 rebuild API.
src/main/java/icu/samnyan/aqua/net/games/ImportController.kt Updates exception filtering to Jackson 3 exception hierarchy.
src/main/java/ext/Json.kt Reworks shared JACKSON mapper setup for Jackson 3, adds legacy LocalDateTime array parsing, and exposes a Spring JsonMapper bean to ensure Kotlin module usage for HTTP responses.
build.gradle.kts Removes Jackson 2 kotlin/jsr310 deps and adds Jackson 3 kotlin module dependency.

馃挕 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@hykilpikonna
hykilpikonna merged commit 3be8152 into v1-dev Aug 5, 2026
1 check passed
@hykilpikonna
hykilpikonna deleted the fix-import-v2 branch August 5, 2026 19:21
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.

2 participants