Ejemplo n.º 1
0
        private JSONDocument DeserializeDocument(byte[] data)
        {
            var stream = new ClusteredMemoryStream(data);
            int header = stream.ReadByte();

            if ((header & (long)PersistenceBits.Compressed) == (decimal)PersistenceBits.Compressed)
            {
                stream = CompressionUtil.Decompress(stream);
            }
            var document = JSONDocument.Deserialize(stream);// CompactBinaryFormatter.Deserialize(stream, string.Empty);

            stream.Dispose();
            return(document as JSONDocument);
        }
Ejemplo n.º 2
0
 public override void Deserialize(Common.Serialization.IO.CompactReader reader)
 {
     base.Deserialize(reader);
     _document = new JSONDocument();
     _document.Deserialize(reader);
 }