jkob:简单的类型安全的JSON构建器

时间:2024-06-03 15:37:01
【文件属性】:

文件名称:jkob:简单的类型安全的JSON构建器

文件大小:12KB

文件格式:ZIP

更新时间:2024-06-03 15:37:01

kotlin json builder dsl Kotlin

ko Kotlin DSL,用于构建类型安全的JSON 构建JSON的示例: val json = json { " id " to " value " // key->value pair " name " to " foo " " items " [ " value1 " , " value2 " , " value3 " ] // array for (i in 1 .. 2 ) " item $i " to i // you can even use regular loops when building JSON " numbers " [ 1 , 2 , 3 ] " child " { // child object " age " to 19 " isValid " to false


【文件预览】:
jkob-master
----src()
--------test()
--------main()
----.travis.yml(45B)
----LICENSE(11KB)
----README.md(2KB)
----pom.xml(7KB)
----.gitignore(230B)

网友评论