Adding ability to pass in json_decode($data, true)

This should handle issue #44.