JSON normally does not serialize or deserialize Private Members. Therefore, when using JSON for deep copy, data will be lost.
Solution: declare a public member. During JSON serialization and deserialization, if the class contains icommand members, serialization may fail. Therefore, only the model layer should be used for JSON applications in WPF. JSON declares a base class object. In fact, when the object of the derived class is serialized and deserialized, the string during serialization is correct, but deserialization is because the base class is declared, therefore, it is a base class object, resulting in data loss of the derived class object. Solution: XML serialization or deserialization may be better at this time. The problem with XML serialization deserialization is that the serialization of a dictionary object is not successful unless you implement the serialization interface for dictionay yourself. JSON may be used in this case. You can use [xmlignore] or [jsonignore] to control whether attribute serialization is ignored during XML and JSON serialization.