我正在尝试将字典集合写入文件。
集合的结构如下:
GlobalCollection (Collection of TestCollection)
(0)
[KEY]
[Value]
- TotalGlobal_W_Count (Integer)
- TotalGlobal_I_Count (Integer)
- TotalGlobal_F_Count (Integer)
TestCollection (Dictionary - Key, Value)
(0)
[KEY]
[Value]
- NumberOfTests (Integer)
- TestCollectionName (String)
- TypesOfTests (ArrayList)
ResultsCollection (Dictionary - Key, Value)
(0)
[KEY]
[Value]
- TotalFcount (Integer)
- TotalIcount (Integer)
- TotalWcount (Integer)
- ID (String)
- TestFolderType(String)
- TestPassed (Boolean)
- FullLog (Array)
ResultsCollection (Dictionary - Key, Value)
(0)
[KEY]
[Value]
- LineNumber (Integer)
- MessageType (String)
- ResultString (String)
我想将上述所有变量写入文本文件,同时保持层次结构格式。(注意每个集合对象中可以有多个元素)
谢谢!!!