Share via

C# JSON Deserialization

Chris M 1 Reputation point
2022-06-03T18:42:59.753+00:00

I am having an issue with JSON deserialization and updating the values.
I have an application that reads a json file and deserializes the data to be sent to a website.
This part works exactly as i expect it to.

The problem is the web site can update the data and send it back to the application. I can see the data come into the application but the problem is if i only update a portion of the file and send back just the edits it erases everything in the JSON Root except for the new data. I want to be able to read, update, and then resave the data to a text file.

Any suggestions on what i could look into.

Developer technologies | C#
Developer technologies | C#

An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.


1 answer

Sort by: Most helpful
  1. Chris M 1 Reputation point
    2022-06-27T14:30:57.06+00:00

    I went with Karens idea for most of the updates. I ended up having to write some custom JSON strings for any information that i did not need in the main file. So now when a user uses the Web UI and request network info i can send and or receive just that data from the server.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.