Search code examples
iphonejsonserializationrestkitafnetworking

RESTKit serializing nil to JSON


I'm new to RESTKit 0.20, but I was wondering, is it possible as of right now to serialize an object's nil instance variable to JSON?

To be precise, I want to serialize NSString that is nil


Solution

  • This feature is added in a recent (at time of writing) commit: bb34247aef19d40b725bdcc8e96466f80a033124. So it requires you to use at least v0.22.0

    The linked commit includes a number of new tests which show the mapping in action.