How to access local variable (type=LocalDate) in the UI designer

I'm trying to access a local variable in the UI designer using this API call '../API/bpm/activityVariable/{{taskId}}/localVariableName', the type of the local variable is 'LocalDate'. And i'm getting this error :

org.restlet.engine.adapter.ServerAdapter.commit An exception occurred writing the response entity     com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Java 8 date/time type `java.time.LocalDate` not supported by default: add Module "com.fasterxml.jackson.datatype:jackson-datatype-jsr310" to enable handling'.

How to solve this problem?

P.S: Note that if the type of the local variable was 'String' or 'Integer', i'm not getting any errors. i.e. the error appears only with (LocalDate, LocalDateTime) classes