I have some values need to be added to an array (using initWithObjects), and encode to JSON string later.
As everyone knows, when array meet a nil, it will stop read next value.
As convention of JSON Array, the nil should be act as an null in ordered position.
Should I check every value, and manually convert it to [NSNull null] before add it to array?
Yes. You can create a simple helper method/function:
and then: