Created
June 26, 2017 21:55
-
-
Save xplicit/c9906679188b0b7ff1d8f496d5e3f506 to your computer and use it in GitHub Desktop.
Leading Zeroes Deserialization
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Globalization; | |
using ServiceStack.Text; | |
using System; | |
JsConfig<Int32>.DeSerializeFn = x => Int32.Parse(x, CultureInfo.InvariantCulture); | |
var result = JsonSerializer.DeserializeFromString("011",typeof(Int32)); | |
// Save a copy of this *public* Gist by clicking the "Save As" below |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<packages> | |
<package id="ServiceStack.Text" version="4.0.60" targetFramework="net45" /> | |
<package id="ServiceStack.Client" version="4.0.60" targetFramework="net45" /> | |
<package id="ServiceStack.Interfaces" version="4.0.60" targetFramework="net45" /> | |
</packages> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment