No parameterless constructor defined for type of ‘System.String’ during JSON deserialization

Parameterless constructors need for any kind of deserialization. Imagine that you are implementing a deserializer. You need to:

  1. Get a type of object from the input stream (in this case it’s string)
  2. Instantiate the object. You have no way to do that if there is no default constructor.
  3. Read the properties/value from stream
  4. Assign the values from the stream to the object created on step 2.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)