``` override fun updateModel(json: JsonObject) { ...
# tornadofx
r
Copy code
override fun updateModel(json: JsonObject) {
        with(json) {
            name = json.getString("name")
            dropAllowed = json.getBoolean("dropAllowed")
            children.setAll(json.getJsonArray("children")?.toModel() ?: emptyList<PhotoCategory>())
            photolist.setAll(json.getJsonArray("photolist")?.toModel() ?: emptyList<Photo>())
        }