-
Convert JSON to XML - C# Routine?
Can someone please provide me C# code on converting JSON to XML. I'm looking to convert somehting like:
{Test:{a:1,b:2,c:{x=3},d:4}}
to
<test a="1" b="2" d="4">
<c x="3" />
</test>
I'm using .NET Framework v1.1 so the Ajax extensions for ASP.NET are no good to me.
Thanks.
-
In your situation, I would probably use something like Json.NET to deserialize the JSON, then use .NET's standard XmlSerializer to serialize to XML.
Phil Weber
http://www.philweber.com
Please post questions to the forums, where others may benefit.
I do not offer free assistance by e-mail. Thank you!
-
Hi Phil. Thanks for the info. The only problem i have with Json.net is it is using .NET Framework 2.0. Im using 1.1 within VS .NET 2003. My assembly refuses to reference its DLL. ****.
Any alternatives?
-
Json.NET is open source, right? Couldn't you download the source and and back-port it to .NET 1.1?
Phil Weber
http://www.philweber.com
Please post questions to the forums, where others may benefit.
I do not offer free assistance by e-mail. Thank you!
-
That would be a good idea but thats the problem. The source is geared towards 2.0 and 2.0 assembly references. Unfortunately my knowledge of 2.0 to 1.1 mapping isnt that extensive.
Similar Threads
-
By Tim in forum xml.announcements
Replies: 0
Last Post: 10-11-2001, 04:00 PM
-
By xmlstartkabel in forum XML
Replies: 0
Last Post: 10-10-2001, 04:07 AM
-
By Tim Frost in forum xml.announcements
Replies: 0
Last Post: 04-02-2001, 10:53 AM
-
By Extensibility in forum web.announcements
Replies: 0
Last Post: 07-20-2000, 06:20 PM
-
By Sales in forum xml.announcements
Replies: 0
Last Post: 07-20-2000, 06:18 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks