Skip to content

Conversation

@rolang
Copy link
Owner

@rolang rolang commented Jan 2, 2026

No description provided.

@rolang rolang marked this pull request as ready for review January 3, 2026 03:33
@rolang rolang requested a review from Copilot January 3, 2026 03:33
Copy link
Contributor

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 requires users to provide a custom JSON type reference when using the Jsoniter codec, addressing a limitation where Jsoniter doesn't provide a built-in type for raw JSON values. The change makes the JSON type configuration explicit and mandatory for Jsoniter users.

  • Modified the JsonCodec.Jsoniter enum case to require a jsonTypeRef parameter
  • Added CLI validation to enforce the -jsoniter-json-type parameter when using Jsoniter
  • Removed auto-generated codec logic in favor of requiring user-provided custom JSON types

Reviewed changes

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

Show a summary per file
File Description
modules/core/shared/src/main/scala/codegen.scala Modified JsonCodec.Jsoniter to accept a jsonTypeRef parameter, removed common codec generation logic, and updated code generation to use the custom JSON type reference
modules/cli/src/main/scala/cli.scala Updated argument parsing to require -jsoniter-json-type when using Jsoniter codec, modified argument processing to preserve case sensitivity for values
modules/example-jsoniter-json/shared/src/main/scala/json.scala Added example implementation of a custom Jsoniter JSON type using an opaque type wrapper around Array[Byte]
build.sbt Added new exampleJsoniterJson project, updated jsoniter-scala version to 2.38.8, and configured test projects to depend on the example JSON implementation when using Jsoniter
README.md Updated documentation with example of custom Jsoniter JSON type, added new -jsoniter-json-type configuration parameter, and updated dependency versions
test_gen.sh Added -jsoniter-json-type parameter to test generation script and changed array type to ziochunk
example/generate.scala Updated Scala version to 3.7.4, updated codegen dependency version to 0.0.12, and switched JSON codec from Jsoniter to ZioJson

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

rolang and others added 3 commits January 3, 2026 10:40
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@rolang rolang merged commit fe37f09 into master Jan 3, 2026
2 checks passed
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