Skip to content

[MS-1293] Refactor feature/clientapi to use Kotlin Serialization instead of Jackson#1527

Merged
meladRaouf merged 1 commit into
mainfrom
ks-feature-clientapi-module
Jan 12, 2026
Merged

[MS-1293] Refactor feature/clientapi to use Kotlin Serialization instead of Jackson#1527
meladRaouf merged 1 commit into
mainfrom
ks-feature-clientapi-module

Conversation

@meladRaouf
Copy link
Copy Markdown
Collaborator

@meladRaouf meladRaouf commented Jan 12, 2026

JIRA ticket
Will be released in: 2026.1.0

Notable changes

  • Use kotlin serialization to parse and extract subjectAge metadata param from requests
  • Added unit tests

Testing guidance

  • Pass metadata to SID and check if it is parsed well

Additional work checklist

  • Effect on other features and security has been considered
  • Design document marked as "In development" (if applicable)
  • External (Gitbook) and internal (Confluence) Documentation is up to date (or ticket created)
  • Test cases in Testiny are up to date (or ticket created)
  • Other teams notified about the changes (if applicable)

@meladRaouf meladRaouf force-pushed the ks-feature-clientapi-module branch from 535f3b7 to 7da610e Compare January 12, 2026 14:14
Copy link
Copy Markdown

Copilot AI left a comment

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 refactors the feature/client-api module to use Kotlin Serialization instead of Jackson for JSON processing, as part of a broader effort to migrate away from Jackson throughout the codebase before the 2026.1.0 release.

Changes:

  • Replaced Jackson JSON processing with Kotlin Serialization in the client-api feature module
  • Updated validateJsonOrThrow to use Kotlin Serialization's parseToJsonElement
  • Removed Jackson-specific serialization module setup for TokenizableString (now handled by @Serializable annotations)

Reviewed changes

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

Show a summary per file
File Description
infra/core/src/main/java/com/simprints/core/tools/json/JsonHelper.kt Updated validateJsonOrThrow to use Kotlin Serialization instead of Jackson's readTree, with appropriate documentation
feature/client-api/src/main/java/com/simprints/feature/clientapi/usecases/GetEnrolmentCreationEventForRecordUseCase.kt Removed Jackson imports and custom serialization module; replaced toJson call with json.encodeToString
feature/client-api/src/main/java/com/simprints/feature/clientapi/mappers/request/extractors/ActionRequestExtractor.kt Refactored getSubjectAge() to use Kotlin Serialization for parsing metadata JSON; removed unused Intent extension
feature/client-api/src/test/java/com/simprints/feature/clientapi/usecases/GetEnrolmentCreationEventForRecordUseCaseTest.kt Updated test to verify the new encodeToString method call instead of toJson
feature/client-api/src/test/java/com/simprints/feature/clientapi/mappers/request/extractors/ActionRequestExtractorTest.kt Added comprehensive test coverage for getSubjectAge() with edge cases
feature/client-api/build.gradle.kts Added Kotlin Serialization plugin and removed Jackson dependency

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

@sonarqubecloud
Copy link
Copy Markdown

@meladRaouf meladRaouf merged commit 531cb19 into main Jan 12, 2026
13 checks passed
@meladRaouf meladRaouf deleted the ks-feature-clientapi-module branch January 12, 2026 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants