You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by "René Cordier (Jira)" <se...@james.apache.org> on 2020/03/06 09:16:00 UTC
[jira] [Created] (JAMES-3090) Implement jmap protocol POJO and
serialization
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: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org