Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • None
    • JMAP
    • None

    Description

      The idea would be to deserialize the invocation data-type [1] as well as the request object [2] for the echo method using *play-json* library.

       {
       "using": [ "urn:ietf:params:jmap:core"],
       "methodCalls": [
       [ "Core/echo",
      { "arg1": "arg1data", "arg2": "arg2data" }
      , "c1" ]
       ]
       }
      

      [1] https://jmap.io/spec-core.html#the-invocation-data-type
      [2] https://jmap.io/spec-core.html#the-request-object

      The *MethodArguments* will be a sealed trait.

      Deserialisation of Requestobject will be done with pattern matching:
      `JsArray(Seq(JsString(methodName), JsObject, JsString(methodCallId))`

      Also we will need to serialize the response object [3]:

       {
       "methodResponses": [
       [ "Core/echo",
      
      { "arg1": "arg1data", "arg2": "arg2data" }
      
      , "c1" ]
       ],
       "sessionState": "75128aab4b1b"
       }
      

      [3] https://jmap.io/spec-core.html#the-response-object

      *DOD* demonstrate serialization / deserialization in unit tests in `jmap-rfc-8620` maven module

      Attachments

        Activity

          People

            aduprat Antoine Duprat
            btellier Benoit Tellier
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: