[英]How to convert JSON object received in response to REST Client request to a MT940 Swift text file in Java?
How to convert sample JSON given below to a MT940 txt file:如何将下面给出的示例 JSON 转换为 MT940 txt 文件:
This JSON would be a bad sample to show but hope you get the gist of it... Just like we have a library in place to parse MT940 strings/txt we also have a library which can help construct a MT940 txt file in Java.这个 JSON 将是一个不好的示例,但希望你能理解它的要点......就像我们有一个库来解析 MT940 字符串/txt 我们也有一个库可以帮助在 Java 中构建一个 MT940 txt 文件。
{
"accNumber":"123356",
"openBalInd":"D",
"openBalaDate":"200605",
"curr":"Dollar",
"transactions":[
{
"amount":""434,
"credit/debit":"1000",
"datetime":"20042020"
},
{
"amount":""434,
"credit/debit":"1000",
"datetime":"20042020"}]
}
MT940 is SWIFT message type. MT940 是 SWIFT 消息类型。
Your input is JSON and the output is MT940 text file.您的输入是 JSON 和 output 是 MT940 文本文件。
It is always good to have some java model classes representing your json.有一些 java model 类代表您的 json 总是好的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.