This repository has been archived by the owner on Sep 28, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 271
JsonArray cannot be created #414
Comments
Provided that add("folders", folders.toJSON()) Complete example: class FolderInfo : JsonModel {
val nameProperty = SimpleStringProperty()
val name by nameProperty
override fun toJSON(json: JsonBuilder) {
with (json) {
add("name", name)
}
}
}
class SomeObject : JsonModel {
val foldersProperty = SimpleListProperty<FolderInfo>()
var folders by foldersProperty
override fun toJSON(json: JsonBuilder) {
with(json) {
add("folders", folders.toJSON())
}
}
|
I just added a function so you can avoid the add("folders", folders) |
Thanks. I waited it. |
You can just add |
I just used a older version, thanks for solving |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I cannot create JsonArray, while serialize JsonModel.
How can i create array of files?
The text was updated successfully, but these errors were encountered: