I am facing an issue while implementing the drafts API using spring boot. All the APIs are working but this one API is giving me a tough time and I am unable to understand the issue.
Has anyone implemented this and could guide me through the issue? I am putting the error that I am able to catch into the exception:
2023-05-15 15:09:44.310 ERROR 880 --- [nio-5000-exec-1] c.b.c.e.advice.ExceptionHandlerAdvice    :  ** Exception Leaked & captured : JsonParseException; Unrecognized token 'Optional': was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 'false')
 at [Source: (String)"Optional[java.nio.HeapByteBuffer[pos=0 lim=16187 cap=16187]]"; line: 1, column: 9]
2023-05-15 15:09:44.315 DEBUG 880 --- [nio-5000-exec-1] s.s.w.c.SecurityContextPersistenceFilter : Cleared SecurityContextHolder to complete request
com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'Optional': was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 'false')
Here is the payload as well and URL “/drafts.json”:
{
    "draft_key": "new_topic",
    "sequence": 94,
    "data": {
        "reply": "estaetwetweas sfasdf asdfa sdf as ",
        "action": "createTopic",
        "title": "test test test",
        "categoryId": 5,
        "archetypeId": "regular",
        "metaData": null,
        "composerTime": 19025,
        "typingTime": 4800
    }
}

 
 