私は Yahoo メール Web サービスから json resonse を抽出しました。その後、play json ライブラリを使用して解析しました。
今、私はそれを繰り返して、送信者名、件名、ccListなどでメールオブジェクトのリストを作成することができません.
私が構築しようとしているメールオブジェクトは次のとおりです: List(EmailMessage(subject, recvdDate,body1,sender,recipientsList))
play websiteのドキュメントを調べました。しかし、scala の学習者としてそれらを理解するのは困難でした。ケースクラスを使用してこれを達成する方法を教えてください。
フォーム Web サービスを取得した応答:
{
"result": {
"folder": {
"folderInfo": {
"fid": "Sent",
"name": "Sent"
},
"total": 3,
"unread": 0,
"size": 943522,
"isSystem": true
},
"total": 3,
"code": [],
"message": [
{
"mid": "2_0_0_2_3196_ACfai2IAACqmUwNFtgAAAKAUN2U",
"receivedDate": 1392723382,
"subject": "test mail",
"xapparentlyto": "",
"hasBlockedImages": false,
"flags": {
"isReplied": 0,
"isFlagged": 0,
"isRead": 1,
"isDraft": 0,
"isForwarded": 0,
"isHam": 0,
"isSpam": 0,
"hasAttachment": 0,
"isRecent": 1,
"inAddressBook": 0
},
"from": {
"email": "rajeevkumar.kallempudi@yahoo.com",
"name": "Rajeev Kumar Kallempudi"
},
"to": [
{
"email": "rajeevprasanna@gmail.com",
"name": "rajeevprasanna@gmail.com"
}
],
"replyto": [
{
"email": "rajeevkumar.kallempudi@yahoo.com",
"name": "Rajeev Kumar Kallempudi"
}
],
"cc": [],
"bcc": [],
"domainkey": false,
"messageId": "<1392723382.76715.YahooMailNeo@web160105.mail.bf1.yahoo.com>",
"inReplyTo": "",
"references": "",
"sender": "rajeevkumar.kallempudi@yahoo.com",
"part": [
{
"partId": "HEADER",
"type": "x-unknown",
"subtype": "",
"typeParams": "",
"disposition": "",
"dispParams": "",
"encoding": "7bit",
"filename": "",
"size": 1474,
"contentId": "",
"isTruncated": false,
"hasBlockedImages": false,
"referencedInline": false
}
]
},
{
"mid": "2_0_0_2_2463_ACfai2IAAAdpUwM1NwAAAD0sJOA",
"receivedDate": 1392719159,
"subject": "passage1",
"xapparentlyto": "",
"hasBlockedImages": false,
"flags": {
"isReplied": 0,
"isFlagged": 0,
"isRead": 1,
"isDraft": 0,
"isForwarded": 0,
"isHam": 0,
"isSpam": 0,
"hasAttachment": 0,
"isRecent": 1,
"inAddressBook": 0
},
"from": {
"email": "rajeevkumar.kallempudi@yahoo.com",
"name": "Rajeev Kumar Kallempudi"
},
"to": [
{
"email": "rajeevkumar.kellmpudi@yahoo.com",
"name": ""
}
],
"replyto": [
{
"email": "rajeevkumar.kallempudi@yahoo.com",
"name": "Rajeev Kumar Kallempudi"
}
],
"cc": [],
"bcc": [],
"domainkey": false,
"messageId": "<1392719159.63976.YahooMailNeo@web160106.mail.bf1.yahoo.com>",
"inReplyTo": "",
"references": "",
"sender": "rajeevkumar.kallempudi@yahoo.com",
"part": [
{
"partId": "HEADER",
"type": "x-unknown",
"subtype": "",
"typeParams": "",
"disposition": "",
"dispParams": "",
"encoding": "7bit",
"filename": "",
"size": 1949,
"contentId": "",
"isTruncated": false,
"hasBlockedImages": false,
"referencedInline": false
},
{
"partId": "TEXT",
"subtype": "alternative",
"type": "multipart",
"typeParams": "boundary=\"-827237569-990831377-1392719159=:63976\"",
"disposition": "",
"dispParams": "",
"encoding": "7bit",
"filename": "",
"size": 11623,
"contentId": "",
"isTruncated": false,
"hasBlockedImages": false,
"referencedInline": false
}
]
}
]
},
"error": null
}