private static unsafe void deSerialize(AutoCSer.JsonDeSerializer parser, ref CustomClass value) { char *read = parser.CustomRead; if (parser.VerifyRead(1)) { switch (*(char *)read) { case '1': value = new CustomClass { Value = null }; return; case '2': value = new CustomClass { Value = string.Empty }; return; default: parser.MoveRead(-1); return; } } }