You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
1.
create a simple class that have the a property that return an XElement value
like this
public class MyClass
{
private string _id;
public String Id { get { return _id; } set { _id = value; } }
private string _text;
public String Text { get { return _text; } set { _text = value; } }
public MyClass()
{
}
public XElement XElement
{
get
{
return new XElement("MyClass",
new XAttribute("id", Id),
new XElement("Text", Text)
);
}
}
}
2.
test the serializer in this way
static void Main(string[] args)
{
MyClass req = new MyClass() { Id = "11", Text = "22" };
string s = req.ToJson();
}
What is the expected output? What do you see instead?
The correct serialized values
{"Id":"11","Text":"22"}
but you get the exception
What version of the product are you using? On what operating system?
Last ServiceStack.Text Dll on a Windows 7 Pro SP1 with VS 2010 Ultimate and
.NET 4.0
Please provide any additional information below.
Original issue reported on code.google.com by stiliu...@hotmail.com on 16 Sep 2011 at 8:09
Original issue reported on code.google.com by
stiliu...@hotmail.com
on 16 Sep 2011 at 8:09Attachments:
The text was updated successfully, but these errors were encountered: