Encode to JSON

Can encode NSArray, NSDictionary and JSONModel objects. JSONModel
objects must be set explicitly through setDataFromObject: