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
Hello!
Is there any way to wire a custom JsonSerializer to the spring-graphql? I have a custom serializer for setting the precision of double values. For example:
classResponse {
@JsonSerialize(using =CustomFormatter::class)
@Precision(2)
val number:Double,
}
If for example, number has a value 2.8503471831075 it will shrink precision to the 2.85.
I have a similar serializer for an application with rest api using JsonSerializer and ContextualSerializer, but I can't make it work in a project with spring-graphql. Maybe there is a different way to achieve this functionality?