Back to CSV - Convert CSV text to Objects; via JSON

Posted by: Williams .Net Zone, on 13 Nov 2008 | View original | Bookmarked: 0 time(s)

As Json is easier to read and write then Xml. It follows that CSV (comma seperated values) is easier to read and write then Json. CSV also has tools such as Excel and others that make it easy to work with and create. So if you ever want to create a config or data file for your next app, here is some code to convert CSV to JSON to POCO objects. Control Method public void ConvertCsvToObjects(){ string csv = File.ReadAllText(@"c:\temp\mycsv.txt"); /* mycsv.txt - Note the doube quotes...

Advertisement
Free Agile Project Management Tool from Telerik
TeamPulse Community Edition helps your team effectively capture requirements, manage project plans, assign and track work, and most importantly, be continually connected with each other.
Category: ASP.NET | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 2946 | Hits: 132

Similar Posts

  • Silverlight Get Color from Hex more
  • Native JSON Parsing: What does it mean? more
  • The Header Content Control more
  • Silverlight IValueConverter vs. TypeConverter more
  • Rownumber in Silverlight Datagrid or Listbox more
  • C# 4.0, Dynamic Programming and JSON more
  • Using the power of binding to animate changes more
  • DataTable JSON Serialization in JSON.NET and JavaScriptSerializer more
  • GeoRSS Editor alpha version is up and running more
  • NavigationWindow, WinFormsHost and TextBoxes: backspace bug more

News Categories

.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Data | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD