Fix Liam waiting rotation and capability ready acknowledgement
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
package org.json
|
||||
|
||||
// Bounded flat AUTH/HELLO response adapter. Outbound JSON uses production protocol.
|
||||
// Bounded flat AUTH/HELLO/capability response adapter. Outbound JSON uses production protocol.
|
||||
// This does not exercise Android's JSON parser, which the APK build compiles.
|
||||
class JSONObject() {
|
||||
private val fields=linkedMapOf<String,Any>()
|
||||
constructor(text: String):this() {
|
||||
check(text.length<2048 && text.startsWith("{") && text.endsWith("}"))
|
||||
val entries=Regex("\"([a-z_]+)\":(\"[a-z_]+\"|true|false|[0-9]+)").findAll(text)
|
||||
val entries=Regex("\"([a-z0-9_]+)\"\\s*:\\s*(\"[a-z0-9_.-]*\"|true|false|[0-9]+)").findAll(text)
|
||||
entries.forEach {
|
||||
val raw=it.groupValues[2]
|
||||
fields[it.groupValues[1]]=when {
|
||||
|
||||
Reference in New Issue
Block a user