转换列表<;列表<;字符串>&燃气轮机;groovy脚本中json格式的数据

转换列表<;列表<;字符串>&燃气轮机;groovy脚本中json格式的数据,groovy,Groovy,我已从excel中读取数据并存储在列表中。下面是数据。现在我必须将下面的数据转换为json格式。谢谢 [[type, reference, Description, Quantity, unitPrice], [Hours, 3HANALYSIS, 0. Analysis, 25.0, 0.0], [Hours, 3HANALYSIS, 0. Managing, 12.0, 0.0], [Hours, 3HSWDEVELOPMENT, 1. Development, 0.0, 0.0], [Ho

我已从excel中读取数据并存储在
列表中
。下面是数据。现在我必须将下面的数据转换为json格式。谢谢

[[type, reference, Description, Quantity, unitPrice], [Hours, 3HANALYSIS, 0. Analysis, 25.0, 0.0], [Hours, 3HANALYSIS, 0. Managing, 12.0, 0.0], [Hours, 3HSWDEVELOPMENT, 1. Development, 0.0, 0.0], [Hours, 3HSWDEVELOPMENT, 1.1. New table at database to define valid attributes, 2.0, 0.0], [Hours, 3HSWDEVELOPMENT, 1.2. New field Attribute (foreign key) at Modules, Wires, Fuses, 4.0, 0.0], [Hours, 3HSWDEVELOPMENT, 1.3. QSS1 importing, new errors QSSE, 12.0, 0.0], [Hours, 3HSWDEVELOPMENT, 1.4. Import new field when importing TDE, 3.0, 0.0], [Hours, 3HSWDEVELOPMENT, 1.5. Precompiler: management of new rule "Filter wires based in attribute", 20.0, 0.0], [Hours, 3HSWDEVELOPMENT, 1.6. Wintestem: script to check control digit at FE label (to be run at Cabin BT or ECB, as matching condition with FE harness), 5.0, 0.0], [Hours, 3HSWDEVELOPMENT, 1.7. KSK Studio, 0.0, 0.0], [Hours, 3HSWDEVELOPMENT, 1.7.1. KSK Studio: new screen to define valid attributes, 6.0, 0.0], [Hours, 3HSWDEVELOPMENT, 1.7.2. KSK Studio: Rules editor: new rule to "Filter wires based in attribute", 7.0, 0.0], [Hours, 3HSWDEVELOPMENT, 1.7.3. KSK Studio: Screen for clips assignation to substation/station: option to filter based on attribute, 8.0, 0.0], [Hours, 3HSWDEVELOPMENT, 1.7.4. KSK Studio: Show attribute in wires, clips, fuses..., 13.0, 0.0], [Hours, 3HSWDEVELOPMENT, 1.7.5. KSK Studio: allow to change attribute in wires, clips, fuses..., 24.0, 0.0], [Hours, 3HSWDEVELOPMENT, 1.7.6. KSK Studio: enhancements in flow sequence (parallel, sequential stations with n nested levels, 60.0, 0.0], [Hours, 3HSWDEVELOPMENT, 1.8. KSK Client: Support for new possibilities in flow sequence, 20.0, 0.0], [Hours, 3HSWDEVELOPMENT, 1.9. Prevalidation, 8.0, 0.0], [Hours, 3HSWDEVELOPMENT, 7. Documentation, 12.0, 0.0], [Hours, 3HSUPPORT, 8. Validation, 0.0, 0.0], [Hours, 3HSUPPORT, 8.1. KSK Studio, 8.0, 0.0], [Hours, 3HSUPPORT, 8.2. QSS1 Service, 4.0, 0.0], [Hours, 3HSUPPORT, 8.3. Precompiler Service, 4.0, 0.0], [Hours, 3HSUPPORT, 8.4. Flow sequence, 8.0, 0.0], [Hours, 3HSUPPORT, 9. Support, 12.0, 0.0]]
谢谢,我自己解决
我已经看过了

你试过什么了?文档中关于将对象转换为Json的部分没有帮助吗?您是否尝试过将myListAsJson=myList定义为JSON?