Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Serialize object to XML
Message
General information
Forum:
ASP.NET
Category:
XML
Environment versions
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01611470
Message ID:
01611486
Views:
52
>I need to pass the object to SQL procedure. I think it's easier to pass as XML. I would have used table variable, but we're still supporting SQL 2005 thus I am using XML as my SQL procedure parameter.

What difference does that make? It's just strings you're passing either way unless you're explicitly using the SQL Server XML types (which are a pain to use anyway)...

Either way it's pretty trivial to create a wrapper routine for either XML or Json that you can call easily from your application.

+++ Rick ---

>>I would probably use JSON instead of XML. Reason: it's easier to do the serialization and JSON serialization can handle a lot more types than
>>XmlSerialization can and the data produced is actually smaller as well.
>>
>>* JsonConvert.Serialize()
>>* JsonConvertDeserialize< t >()
>>
>>using Json.NET (which is default requirement on all web projects anyway).
>>
>
>I need to pass the object to SQL procedure. I think it's easier to pass as XML. I would have used table variable, but we're still supporting SQL 2005 thus I am using XML as my SQL procedure parameter.
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform