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

Support Map<String, T> in JsonSerializer.toJson(Object) #20750

Open
Legioth opened this issue Dec 19, 2024 · 0 comments
Open

Support Map<String, T> in JsonSerializer.toJson(Object) #20750

Legioth opened this issue Dec 19, 2024 · 0 comments

Comments

@Legioth
Copy link
Member

Legioth commented Dec 19, 2024

Description of the bug

When dealing with dynamic data in e.g. LitRenderer.withProperty, it is tempting to use a java.util.Map to represent the data. This does currently not work as expected since the map instance goes down to the Introspector.getBeanInfo(type) branch which doesn't do anything meaningful for a map.

Expected behavior

Expected that myRenderer.withProperty("foo", ignore -> Map.of("foo", "bar")) would send {"foo": "bar"} as JSON to the client.

Minimal reproducible example

See above

Versions

  • Vaadin / Flow version: 24.6.0
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

No branches or pull requests

1 participant