In general, there was a question which is better to use for deserialization of json Json.net or DataContractJsonSerializer in C #. My created json type is

[{ "Name":"Test1", "Author":"Test1", "Description": "Тут должно быть описание", "Regex":true, "Search":"Текст для поиска", "Replace":"Текст для замены", "Add":"assets/test.txt", "Target":"/test.txt", "Delete":"/assets/test.txt" }] 

Closed due to the fact that it is necessary to reformulate the question so that it was possible to give an objectively correct answer by the participants AK , EvgeniyZ , LFC , freim , Suvitruf January 26 at 8:12 .

The question gives rise to endless debates and discussions based not on knowledge, but on opinions. To get an answer, rephrase your question so that it can be given an unambiguously correct answer, or delete the question altogether. If the question can be reformulated according to the rules set out in the certificate , edit it .

  • Everyone has different tastes. I for example hate DataContractJsonSerializer and adore Json.net , for someone it's all the opposite. + tasks, sometimes a standard solution is better and there is no possibility to put something from 3 persons. A question of taste! - EvgeniyZ 7:27 pm
  • one
    So-two-in-one and one-in-one questions are not accepted, they are closed as too general. Take out the question about multi-line lines in a separate topic, in this question, better delete - AK
  • For me, the important speed of reading and execution, DataContractJsonSerializer seems to me more simple (wrote a test reader), but to read the execution of this file (this type of expansion) you need something better. - Mr Ikso
  • Do you need to parse json a few megabytes? Do you need to squeeze in milliseconds (while one SQL query to the database will take hundreds of milliseconds)? Hardly. If you had clear requirements, you would have known them in advance and entered into the question. - AK
  • Json.Net loves to throw away an exquisite or return null for every reason :) for which we deeply dislike the public .. but, as they have rightly noted, they don’t argue about tastes. - NewView 8:57 pm

1 answer 1

Holivarny question about the color markers.

There is no difference in performance, for most practical applications there is not much difference in speed.

Problems can float in environments where different deserializers are used due to different readings in json formats.

I love Json.Net and got used to using it. It is important for someone not to drag unnecessary dependencies into the project - and it costs the staff DataContractJsonSerializer.

But if I have to change seats for some reason behind the DataContractJsonSerializer, I don’t see any problems. As developers, we should be able to use the tools, we need to switch to another - we just spend time on development and that's it.

  • Understood so far - I'll try a full-time DataContractJsonSerializer, then if something doesn’t grow up before Json.Net. Thank you - Mr Ikso pm