Within my JavaScript file, I am utilizing the following getJSON method like so:
$.getJSON('do/ajax-convertlocaldatetime', {
timestamp : localdatetime,
The localdatetime variable is an instance of a LocalDateTime object. This ajax call triggers a Java class called ConvertLocalDateTime.java
which is intended to assign the value of localdatetime
to another LocalDateTime variable named timestamp
.
The problem lies in the fact that the Java class is receiving null
for the timestamp
variable. I have verified that the getters and setters are functioning correctly. Interestingly, I do not face this null value issue when I switch to using strings instead of LocalDateTime objects. Any suggestions or insights on this matter?