0

I try to send to WCF server a property of type 'string' the string will contain a json, but i always get this error:

The server encountered an error processing the request. The exception message is 'There was an error deserializing the object of type XX.XX Encountered unexpected character '''.'. See server logs for more details.

I run a JSON.Stringfy(json) method before is send it to the server, the json looks like this for example:

{
 "JsonString": "{"Wontext":{"StorageUniqueId":"0","FormName":"Form_1","FormVersion":"1.0"}}"
}

What am I doing wrong?

2 Answers 2

1

As the error tells you, the json contains unexpected quotes. Just remove them:

{ "JsonString": { "Wontext": { "StorageUniqueId": "0", "FormName": "Form_1", "FormVersion": "1.0" } } }
Sign up to request clarification or add additional context in comments.

Comments

0

this one worked:

"JsonString": "{\"Context\":{\"StorageUniqueId\":\"0\",\"FormName\":\"Form_1\",\"FormVersion\":\"1.0\"},\"JsonData\":{\"Name\":\"SRS\",\"Disease\":{\"Name\":\"Sick\",\"Location\":\"Left Hand\"},\"bla bla\":\" bla blaaa\"}}}"

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.