c# - Servicestack.Text not parsing json -


I am reading json from the file and serialized any object as read as follows:

  MyObject o = myjson.FromJson & lt; MyObject & gt; ();  

As I went to ServiceStack, Newtonsoft.Json was using JSON text right.

However, after serializing, the object is not being set according to 'o' (i.e. blank or with the default value set in the object's constructor).

class is:

  public class option {public string email; Public string password; Public string reply; // etc ... public options () {this.Email = "default"; this. Password = "default"; // etc ...}}  

What could be wrong?

ServiceStack public regions are not in order by default, but with you It can enable:

  JsConfig.IncludePublicFields = true  

Comments