Can you do something more like this instead?

``` ruby
   return nil unless response.code == "200"
   data = safe_json_parse(response.body)
   Ohai::Log.error("response body was not json") if data.nil?
   data
end

def safe_json_parse(data)
  parser = Yajl::Parser.new
  begin
    parser.parse(data)
  rescue Yajl::ParseError
    nil
  end
end
```

Yajl::Parser#parse takes a string so the StringIO is unnecessary, and there's no need to double parse the data.