将此JSON转换为Dart类所需的Dart代码是什么 [英] What is the Dart code required to convert this JSON to a Dart class
本文介绍了将此JSON转换为Dart类所需的Dart代码是什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有很多要解析的json,它们以Map< String,Map< String,List>>(我认为吗?)
I have a lot of json to parse in the form of Map<String, Map<String, List>> (I think?)
下面是一个小例子来验证:
a small example is below to verify:
{"LEFT":{ "446927m": ["2020-02-21T03:01:04.023+00:00","2020-02-13T21:42:29.829+00:00"], "536278n": ["2019-10-04T07:06:09.878+00:00"]},
"MIDDLE":{ "938012c": ["2020-02-21T00:59:37.909+00:00","2020-01-23T22:39:46.789+00:00","2020-02-06T23:12:33.197+00:00"], "920283b": ["2020-02-07T04:16:39.994+00:00","2020-01-23T22:39:59.787+00:00"]},
"RIGHT":{ "192321k":["2020-02-20T21:31:32.437+00:00","2020-02-07T05:13:11.197+00:00"]}}
我很难弄清楚如何将其放入类中,以便可以将JSON转换为Dart.LEFT,MIDDLE和RIGHT是固定的,但可以有不限数量的字符串,带有0到4个日期.
I am just having a hard time figuring out how to put this into a class so I can convert from JSON to Dart. LEFT, MIDDLE, and RIGHT are fixed, but there could be an unlimited number of strings, with 0 to 4 dates.
推荐答案
您可以使用 https://app.quicktype.io/网站,请尝试:)
you can convert any json data for any language in this https://app.quicktype.io/ web please try :)
这篇关于将此JSON转换为Dart类所需的Dart代码是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文