changed to use quirks mode to deal with apis that return null. (nil.to_json returns "null")