capture socket or bad resource errors
Update README. JSON is supported.