How to check if JSON is null in swift?

前端 未结 5 1666
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:07

    Try corresponding Swift class to following Objective C class,

    dict["outcome_status"] != [NSNull null]
    

提交回复
热议问题