You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my ReactAdapterComponent, I need a json object on the client and want to pass that from the server using setState. Unfortunately the method does not check, if the given parameter is already a valid json object and serialize it nevertheless. That results in an invalid json object on the client.
Expected behavior
Since setState does nothing else than calling setPropertyJson, it should check for the parameter and skip the serialization, if the given object can be passe directly.
It might also make sense to overhaul the JacksonUtils regarding this behavior.
Minimal reproducible example
Create a ReactAdapterComponent subclass. Use setState and pass some JsonValue.
Versions
Vaadin / Flow version: 24.8. alpha7
Java version: 17
The text was updated successfully, but these errors were encountered:
Description of the bug
In my ReactAdapterComponent, I need a json object on the client and want to pass that from the server using
setState
. Unfortunately the method does not check, if the given parameter is already a valid json object and serialize it nevertheless. That results in an invalid json object on the client.Expected behavior
Since
setState
does nothing else than callingsetPropertyJson
, it should check for the parameter and skip the serialization, if the given object can be passe directly.It might also make sense to overhaul the JacksonUtils regarding this behavior.
Minimal reproducible example
Create a ReactAdapterComponent subclass. Use
setState
and pass someJsonValue
.Versions
The text was updated successfully, but these errors were encountered: