Ejemplo n.º 1
0
        public UInt64 DeserializeFromPropertyName(ref JsonReader reader, IJsonFormatterResolver formatterResolver)
        {
            var key = reader.ReadStringSegmentRaw();
            int _;

            return(NumberConverter.ReadUInt64(key.Array, key.Offset, out _));
        }
        public DateTime Deserialize(ref JsonReader reader, IJsonFormatterResolver formatterResolver)
        {
            var str = reader.ReadStringSegmentUnsafe();
            int readCount;
            var ticks = NumberConverter.ReadUInt64(str.Array, str.Offset, out readCount);

            return(UnixEpoch.AddSeconds(ticks));
        }
Ejemplo n.º 3
0
        public ulong ReadUInt64()
        {
            SkipWhiteSpace();

            int readCount;
            var v = NumberConverter.ReadUInt64(bytes, offset, out readCount);
            if (readCount == 0)
            {
                throw CreateParsingException("Number Token");
            }
            offset += readCount;
            return v;
        }