This message was deleted.
# spring
This message was deleted.
Your properties are private, so Jackson doesn’t serialize them I guess. They should be public.
the annotation is also wrong, you need
. though in your case it will not make a difference, since the property name you chose is the same of the field name
@jbnizet that worked. it store data as json "`{\"postId\":10000020,\"userId\":10000001}"` but when trying to access data, it throws
at [Source: (byte[])"{"postId":10000020,"userId":10000001}"; line: 1, column: 37]; nested exception is com.fasterxml.jackson.databind.exc.InvalidTypeIdException: Missing type id when trying to resolve subtype of [simple type, class java.lang.Object]: missing type id property '@class'
It worked by adding
Copy code
@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS)
to class TimelinePost