private void UpdateReader(JsonSerializeSetting setting) { switch (setting.Mode) { case DateTimeSerializationMode.Local: _reader.DateTimeZoneHandling = DateTimeZoneHandling.Local; break; case DateTimeSerializationMode.Unspecified: _reader.DateTimeZoneHandling = DateTimeZoneHandling.Unspecified; break; case DateTimeSerializationMode.Utc: _reader.DateTimeZoneHandling = DateTimeZoneHandling.Utc; break; case DateTimeSerializationMode.RoundtripKind: _reader.DateTimeZoneHandling = DateTimeZoneHandling.RoundtripKind; break; } _reader.FloatParseHandling = FloatParseHandling.Decimal; _reader.DateParseHandling = DateParseHandling.DateTime; }
public ExtendJsonTextReader(TextReader input, JsonSerializeSetting setting) : base(input) { this.setting = setting; }