Skip to content

Commit

Permalink
~test
Browse files Browse the repository at this point in the history
  • Loading branch information
qwwdfsad committed Feb 18, 2021
1 parent 0621150 commit 269d3d3
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,14 +144,20 @@ internal class JsonReader(private val source: String) {
++current
continue
}
val tc = charToTokenClass(c)
currentPosition = current
return tc == TC_STRING || tc == TC_OTHER || tc == TC_BEGIN_LIST || tc == TC_BEGIN_OBJ
return isValidValueStart(c)
}
currentPosition = current
return false
}

private fun isValidValueStart(c: Char): Boolean {
return when (c) {
'}', ']', ':', ',' -> false
else -> true
}
}

/*
* Peeked string for coerced enums.
* If the value was picked, 'consumeString' will take it without scanning the source.
Expand Down

0 comments on commit 269d3d3

Please sign in to comment.