Skip to content

Instantly share code, notes, and snippets.

@mythz
Last active April 5, 2018 19:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mythz/b0124bda98f84a21de0a1f7d5bf6c3d4 to your computer and use it in GitHub Desktop.
Save mythz/b0124bda98f84a21de0a1f7d5bf6c3d4 to your computer and use it in GitHub Desktop.
Encode en-dash char test
using System.Linq;
using ServiceStack;
using ServiceStack.Text;
class Dto
{
public string Text { get; set; }
}
var dto = new Dto { Text = "The – (en dash) character" };
var json = dto.ToJson();
json.Print();
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="ServiceStack.Text" version="5.0.2" targetFramework="net45" />
<package id="ServiceStack.Client" version="5.0.2" targetFramework="net45" />
<package id="ServiceStack.Interfaces" version="5.0.2" targetFramework="net45" />
</packages>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment