René Cordier created JAMES-3090:
-----------------------------------
Summary: Implement jmap protocol POJO and serialization
Key: JAMES-3090
URL: https://issues.apache.org/jira/browse/JAMES-3090
Project: James Server
Issue Type: Improvement
Reporter: René Cordier
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.
{code:java}
{
"using": [ "urn:ietf:params:jmap:core"],
"methodCalls": [
[ "Core/echo",
{ "arg1": "arg1data", "arg2": "arg2data" }
, "c1" ]
]
}
{code}
[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]:
{code:java}
{
"methodResponses": [
[ "Core/echo",
{ "arg1": "arg1data", "arg2": "arg2data" }
, "c1" ]
],
"sessionState": "75128aab4b1b"
}
{code}
[3] [https://jmap.io/spec-core.html#the-response-object]
**DOD** demonstrate serialization / deserialization in unit tests in
`jmap-rfc-8620` maven module
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]