Click here to Skip to main content
16,018,518 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi i have a list var lst that contains some information, as per below line it returns list to xml format , i want it should be return json format.
Quote:
context.Response.Write(_JavaScriptSerializer.Serialize(lst));


please guide..

What I have tried:

I have no idea..
Both the question and 'What have you tried' must be at least 30 characters.
Posted
Updated 24-Jun-16 3:44am
Comments
Sergey Alexandrovich Kryukov 24-Jun-16 9:40am    
There is no one-to-one correspondence between these two languages, so you need to add additional translate rules to your input. You may need some artificial rules used to express something which does not exist in JSON: attributes, namespace...

Let's say, you design all that. Now, what do you mean "how"? By designing and writing some implementation. This is just work of software development. It's not clear what kind of help would you need.
Idea? What idea? Either write it or find some suitable available solution.

—SA

1 solution

First of all, look at Newtonsoft: Converting between JSON and XML.

You can develop your own code, according to your goals, or find something else: XML to JSON conversion ".NET".

—SA
 
Share this answer
 
v2

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