Added .to_json method (so as to not use the object name as the root)
Updated docs, headers are supposed to be a string