Permalink
Browse files

Fix starting with Quote bug

  • Loading branch information...
1 parent 2134272 commit 7fcc505e287f4736b48857d642fadcfb488cd568 @mythz mythz committed Jun 6, 2012
Showing with 553 additions and 536 deletions.
  1. +536 −536 src/ServiceStack.Text/Json/JsonTypeSerializer.cs
  2. +17 −0 tests/ServiceStack.Text.Tests/StringTests.cs
@@ -78,6 +78,23 @@ public void RoundTripTest()
Assert.AreEqual(json, ssJson, "Service Stack round trips correctly");
}
+ public class Poco
+ {
+ public string Name { get; set; }
+ }
+
+ [Test]
+ public void Starting_with_quotes_inside_POCOs()
+ {
+ var dto = new Poco {Name = "\"starting with\" POCO"};
+
+ var json = dto.ToJson();
+
+ var fromDto = json.FromJson<Poco>();
+
+ Assert.That(fromDto.Name, Is.EqualTo(dto.Name));
+ }
+
Movie dto = new Movie {
ImdbId = "tt0111161",
Title = "The Shawshank Redemption",

2 comments on commit 7fcc505

@txdv
txdv commented on 7fcc505 Apr 22, 2014

👍 but need more white space discrepancy

@siwatanejo

:facepalm:

Please sign in to comment.