Showing posts with label JSON. Show all posts
Showing posts with label JSON. Show all posts

2025-05-29

JSON - enum as object instead of string

 

@JsonCreator was to address the issue of the json value as string, instead of enum object.

You're correct in your observation. The @JsonCreator annotation is indeed used to address the issue of deserializing JSON values into enum objects, not specifically for handling negative ids.
Given the context you've provided, it seems the issue might be related to how the enum values are being populated in the byId map.







2022-07-21

Jackson JSON parsing from string to date.

 









@JsonFormat(pattern = "yyyy-MMM-dd")
private Date dateFrom;





not sure if were causing by:
MethodArgumentConversionNotSupportedException when I try to map json string onto java domain class in Spring controller's method






Google Referrals