Solved

JSON Advice

Posted on 2015-01-08
7
99 Views
Last Modified: 2016-08-29
I have a simple C# / .Net project that parses a .json file. It parses and displays the most popular pizzas in a DataGridView. My question pertains to .json parsing.

There is more than one way to approach the problem. I used the JavaScriptSerializer and LINQ. One could use dictionaries, JSON.Net or even something like these:

http://www.codeproject.com/Articles/159450/fastJSON

An XML approach:

http://www.thinqlinq.com/Post.aspx/Title/JSON-Literals-for-VB?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+thinqlinq%2Frss+%28Thinq+Linq%29

Is my project in its current state the recommended approach / accepted approach?

I tried to attach the .json file and .Net project (WinForms for simplicity) in .zip but this site would not allow it. Contact me for source.

Thanks
0
Comment
Question by:elthombre
  • 5
7 Comments
 
LVL 80

Expert Comment

by:David Johnson, CD, MVP
ID: 40539715
upload the file(s) to http://www.ee-stuff.com/Expert/
0
 

Author Comment

by:elthombre
ID: 40539761
Thanks David!
0
 

Author Comment

by:elthombre
ID: 40539928
0
Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

 

Author Comment

by:elthombre
ID: 40543851
I've requested that this question be deleted for the following reason:

I need to rephrase the question as it has not gotten any response, etc. I will have to provide some snippets vs. files and a more clear request regarding result.
0
 
LVL 23

Accepted Solution

by:
Michael74 earned 500 total points
ID: 40543661
This link shows the results of testing against JSON Parsing libraries
http://sagistech.blogspot.com.au/2010/03/parsing-twitter-json-comparing-c.html

It is worth noting that in the tests he performed the File size was 285Mb, containing 208,530 entries. For the JSON file you have attached you will not notice any real difference between the different techniques.

If you want to know about JSON.Net have a look at this page
http://james.newtonking.com/json
0
 

Author Comment

by:elthombre
ID: 40543849
Thanks Michael. Exactly what I was looking for.
0
 

Author Closing Comment

by:elthombre
ID: 40543852
Referenced a nice article on JSON parsing performance which would clearly influence architectural decisions.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question