-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
String -> Json serialization #2089
Comments
The idea is good, but I don't like the API ambiguity. It's quote unclear that you pass an object and then have an option to set |
I probably don't fully understand your concern. With
In other words, the existing code will work exactly the same as it does now (not serializing strings). The advantage of the optional |
I'm actually continuing discussion on this bug: #1886
I have to send an arbitrary object via RestSharp. Currently the only possibility for me is to add the body via
AddParameter(new JsonParameter("", json))
which seems quite ugly to me. It would be nice to add thebool forceSerialize
parameter also to the genericAddJsonBody
and not only to the string specialization. That way I could make sure thatAddJsonBody
serializes the object to a valid JSON for every type.The text was updated successfully, but these errors were encountered: