when decoding JSON from webservice(API) i get error :
Could not cast value of type \'__NSDictionaryM\' (0x1037ad8a8) to \'NSArray\' (0x1037ad470).
>
The bitnami response starts with a { and it is therefore a JSON object, which corresponds to an NSDictionary. The other one starts with [ which indicates an array.
You need to change the type of json to Dictionary, and deserialize as follows:
json = NSJSONSerialization.JSONObjectWithData(data, options: NSJSONReadingOptions.MutableContainers, error: nil) as! Dictionary