N
N
noytmant2020-01-25 23:11:25
JSON
noytmant, 2020-01-25 23:11:25

How to provide a reader in JSON?

Here is such a provision:

XmlReader xmlReader = XmlReader.Create(fileStream);

How to do it in JSON? When I write code like this:
JsonReader jsonReader = JsonReader.Create(fileStream);

Then I don’t have this Create.
At the same time, I looked at some topics on the forums and saw XmlJsonReader in general, but everything is somehow complicated there

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander, 2020-01-25
@NeiroNx

I recently wrote a program in C # - and so it turned out that in the .NET 4.5 client profile there is nothing at all in JSON, than to look for libraries I wrote everything I need through String.format () - it's easier than dragging an additional third-party lib because of a couple of lines.
So in your case, too, probably there are no necessary libraries.

N
noytmant, 2020-01-26
@noytmant

Well, it turned out to be much easier. Original code (Not correct code (Looked something like this)):

JsonReader jsonReader= JsonReader .Create(Queo);
ffgl = (Ffgl)jsonSerializer.Deserialize(jsonReader);

Correct and working code:
var jsoncon = JsonConvert.SerializeObject(Queo);
dtprof = (Ffgl)JsonConvert.DeserializeObject(jsoncon);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question