How to test if JSON object is empty in Java

前端 未结 15 2400

The JSON object I\'m receiving looks like this:

[{\"foo1\":\"bar1\", \"foo2\":\"bar2\", \"problemkey\": \"problemvalue\"}]

What I\'m trying

15条回答
  •  伪装坚强ぢ
    2020-12-14 00:24

    Try /*string with {}*/ string.trim().equalsIgnoreCase("{}")), maybe there is some extra spaces or something

提交回复
热议问题