Click here to Skip to main content
15,888,351 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Code :

var ser = new DataContractJsonSerializer(type);
return ser.ReadObject(new MemoryStream(ASCIIEncoding.ASCII.GetBytes(objectStream)));

In above code, ReadObject() function flags an JSON Injection.

And it is recommended that, Ensure that all serialization to JSON is performed using a safe serialization function that delimits untrusted data within single or double quotes and escapes any special characters.

Can some body help to work on it.

What I have tried:

I tried by using overloaded constructor of "DataContractJsonSerializer".
Posted
Comments
[no name] 7-Mar-16 6:07am    
What is your exact issue?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900