Kotlin DSL 字符串列表
我正在尝试使用 DSL 来创建字符串列表,例如,
Person {
name = "Test"
subjects {
"Physics"
"Chemistry"
"Maths"
}
}
不知道如何执行此操作来获取将存储为列表并在内部调用 api 的主题列表。
I am trying to have a DSL which will create a list of Strings e.g.
Person {
name = "Test"
subjects {
"Physics"
"Chemistry"
"Maths"
}
}
Not sure how I can do this to get the list of subjects which will be stored as a list and calls an api internally.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论