/// <inheritdoc />
        protected override TMain CloseProxy(BlockProcessor blockProcessor, TProxy proxyBlock)
        {
            if (proxyBlock.NumOpenObjects > 0) // JSON in proxy block isn't complete
            {
                // TODO integration test json missing closing curly brackets (will parse till end of doc then should throw here)
                throw new JsonException(string.Format(Strings.JsonException_Shared_InvalidJson, proxyBlock.Lines.ToString()));
            }

            return(_jsonBlockFactory.Create(proxyBlock, blockProcessor));
        }