Json Serializer not Working #226
Unanswered
AXDevTimothy
asked this question in
Q&A
Replies: 1 comment
-
I'm not using JsonNetSerializer any more the project working perfect with many developer , what your problem exactly ? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm a little confused here. At first, My request body was being serialized twice (within the RequestService class). Once by JsonConvert.SerializeObject, and once again then by restSharp Request.addJsonBody(). I commented out the var json = JsonConvert.SerializeObject and it serialized fine then. However, Enums do not serialize to string, and null properties are not excluded as they should be. It sounds like I need to serialize using Json.Net rather then allowing restSharp to serialize, however the Request.JsonSerializer = new JsonNetSerializer() is commented out and I dont see a reference to JsonNetSerializer in the project. I'm surprised this is working for others. Am I missing something? Thanks in advance.

Beta Was this translation helpful? Give feedback.
All reactions