Skip to content

Commit

Permalink
Set json field accessible, fixes #163
Browse files Browse the repository at this point in the history
  • Loading branch information
Bixilon committed Dec 1, 2021
1 parent 41e7e66 commit b7c5bc1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions klaxon/src/main/kotlin/com/beust/klaxon/JsonValue.kt
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ class JsonValue constructor(value: Any?,
// .filter { it.visibility != KVisibility.PRIVATE && it.isAccessible }
// obj.javaClass.declaredFields
.forEach { property ->
property.isAccessible = true
val p = property.call(obj)
result[property] = p
}
Expand Down

0 comments on commit b7c5bc1

Please sign in to comment.