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

doc: HTTP Client cannot use Form & @JsonProperty #11558

Merged
merged 3 commits into from
Feb 5, 2025

Conversation

sdelamo
Copy link
Contributor

@sdelamo sdelamo commented Jan 30, 2025

See: #1853

This pull-requests adds a TCK test, and it documents that although the server binding of a form URL encoded payload supports Jackson annotations such as @JsonProperty, the HTTP Client does not.

The JDK HTTP Client does not even support form URL encoded content type.

See: #1853

This pull-requests adds a TCK test, and it documents that although the server binding of a form-url encoded payload supports Jackson annotations such as @JsonProperty, the HTTP does not.

The JDK HTTP Client does not even support form URL encoded content type.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Without it in native image it renders `{“paginas":100}` instead of `{"title":"Building Microservices","paginas":100}`
}

@Introspected
record Book(@JsonProperty("title") @NonNull String title, @JsonProperty("paginas") @Nullable Integer pages) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

If I use:

@Introspected
record Book(@NonNull String title, @JsonProperty("paginas") @Nullable Integer pages) {}

without the redundant @JsonProperty("title") in GraalVM Native Image it renders as:

{“paginas":100} instead of {"title":"Building Microservices","paginas":100}

Any idea? The TCK uses Micronaut Jackson Databind

@sdelamo
Copy link
Contributor Author

sdelamo commented Feb 4, 2025

ping @yawkat

@sdelamo sdelamo merged commit 3029163 into 4.7.x Feb 5, 2025
22 checks passed
@sdelamo sdelamo deleted the jackson-annotations-form-submissions branch February 5, 2025 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants