How to convert JSON to Object

后端 未结 3 738
南旧
南旧 2021-02-05 23:47

I defined some custom classes, such as Teacher, Student... Now I receive teacher info (JSON string) from remote server.

How can I convert the J

3条回答
  •  时光取名叫无心
    2021-02-06 00:24

    First, do you use JSON Parser? (if not, i'd recommend using SBJson).

    Second, why not create an initWithDictionary init method in your custom class that returns self object?

提交回复
热议问题