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

This should close issue #44.