H
H
hErrosh2014-01-13 00:32:40
JSON
hErrosh, 2014-01-13 00:32:40

How to implement json parser in c# under windows phone?

In general, a friend is a first-year student at the Higher School of Economics. "Distinguished" in front of the teacher and received an "interesting" coursework, not like everyone else, but parsing json into classes in c #, so that it all works on windows phone.
In general, json file promoteeducate1.appspot.com/api/structure/app/fe12...
The result should be similar to the work of the site json2csharp.com, and it should run and work on a phone with windows phone.
Interested in as much detailed advice as possible on the creation of such a project, it is very necessary.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ilya, 2014-01-13
@Gorily

Your friend has two options.
We read the description of the JSON format and write our parser from scratch using what we know best. Let's say regular expressions. General principle: we go from the general to the particular, using recursion. The format is quite clearly described, it should work.
You can take any Open Source library (preferably without dependencies) and see how they do it. You can simply extract all the methods and classes that are used for parsing. A good option is Json.NET ( james.newtonking.com/json ). Here is the source code: https://github.com/JamesNK/Newtonsoft.Json.
From the point of view of laziness, the second option is preferable. But I don’t know how he will understand without proper experience in complex code, let alone explain his work.
From the point of view of training, I would write something of my own according to the first option. Let it be on my knee, but I know how it works.
With regards to Windows Phone - I wouldn't focus on it at all - I can't imagine why it doesn't support something that might be needed to write a parser. As a last resort, you can always write your own implementations of methods and classes or pull them out of the framework.

A
Alexey Kuleshov, 2014-05-23
@GingerbreadMSK

How to patch KDE under FreeBSD?
The scooter is not mine!!! I just posted an ANNOUNCEMENT!
Answer to the question: Json.NET

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question