Skip to content

Commit

Permalink
#235 JSON generator: use nodeType
Browse files Browse the repository at this point in the history
  • Loading branch information
alessiostalla committed Jul 4, 2023
1 parent da09517 commit 2b0e52c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ class JsonGenerator {
JsonElement {
val nodeType = node.nodeType
val jsonObject = jsonObject(
JSON_TYPE_KEY to if (shortClassNames) nodeType.substring(nodeType.indexOf('.') + 1) else nodeType,
JSON_TYPE_KEY to if (shortClassNames) nodeType.substring(nodeType.lastIndexOf('.') + 1) else nodeType,
JSON_POSITION_KEY to node.position?.toJson()
)
if (withIds != null) {
Expand Down

0 comments on commit 2b0e52c

Please sign in to comment.