Some json_encode features weren't available in old PHP versions

Props @rmccue
Added JSONP sanity checks

Props @rmccue
Release version 0.2