예제 #1
0
 private void PrepareForNewDocumentParse(BlittableJsonDocumentBuilder.UsageMode mode, string debugTag)
 {
     _parser.NewDocument();
     _writer.Renew(debugTag, mode);
     _writer.ReadObjectDocument();
     _context.CachedProperties.NewDocument();
 }
예제 #2
0
        private BlittableJsonReaderObject ReadObjectInternal(object builder, string documentId,
                                                             BlittableJsonDocumentBuilder.UsageMode mode)
        {
            _jsonParserState.Reset();
            _objectJsonParser.Reset(builder);
            _documentBuilder.Renew(documentId, mode);
            CachedProperties.NewDocument();
            _documentBuilder.ReadObjectDocument();
            if (_documentBuilder.Read() == false)
            {
                throw new InvalidOperationException("Partial content in object json parser shouldn't happen");
            }
            _documentBuilder.FinalizeDocument();
            var reader = _documentBuilder.CreateReader();

            RegisterLiveReader(reader);
            return(reader);
        }