How to include null value in the JSON via NSJSONSerialization?

前端 未结 4 649
情深已故
情深已故 2020-12-30 22:25

I think I get it how to use the NSJSONSerialization over all. The call I am making is:

[NSJSONSerialization dataWithJSONObject:parameters options:0 error:&a         


        
4条回答
  •  隐瞒了意图╮
    2020-12-30 23:06

    Just try something like this:

    NSDictionary *jsonObj = [NSDictionary dictionaryWithObjectsAndKeys:@"My Name", @"name", @"Developer", @"occupation", NULL, @"My NULL field", nil];
    

    and use this object as parameter where you want it.

提交回复
热议问题