AFNetworking/AFNetworking — pull request #599 by lhunath (2012-10-24 19:19:37+00:00)
Title: Normalize objects for JSON serialization.

[ADDED] normalization of objects before JSON serialization.
- enumerable collections are converted into arrays.
- an error object explains if and why normalization isn't possible (eg. unsupported object type)
- AFNetworking really needs a way to log its errors or pass them to the application, lacking all over.

This is necessary to enable serialization of NSDictionaries that contain NSEnumerables that are not NSArrays. It can be easily extended to enable the serialization of other types of objects that are not natively handled by NSJSONSerialization. This is especially important when serializing from RestKit's Core Data serialized objects that use ordered sets.