added simplejson/json error compatability