private void PrepareForNewDocumentParse(BlittableJsonDocumentBuilder.UsageMode mode, string debugTag) { _parser.NewDocument(); _writer.Renew(debugTag, mode); _writer.ReadObjectDocument(); _context.CachedProperties.NewDocument(); }
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); }