How to check if JSON is null in swift?

前端 未结 5 1665
Happy的楠姐
Happy的楠姐 2021-02-20 14:47

I am currently working on an app which brings back json, in the following format

\"location_subtype\" = \"somevalue\"; \"location_type\" = Force;

5条回答
  •  温柔的废话
    2021-02-20 15:22

    If you're using SwiftyJSON, just check .isEmpty() on the object to confirm if it's empty.

提交回复
热议问题