小编Bip*_*o K的帖子

Google Sheet API V4 Java,从列号获取列字母

您好:使用Google Spreadsheet API V4 on Java,我想获得column letter给定的column number. 示例:第 2列的列字母是B

Google 电子表格 API 中是否已经提供了某种方法,或者是否有其他简单的方法可以执行此操作,或者我需要编写自己的转换?

java google-sheets-api

3
推荐指数
1
解决办法
2634
查看次数

Chai断言,无法使用should/expect来识别财产

您好:需要您的chai断言帮助.

我有一个JSON响应,如下所示.我想断言它只包含"姓氏必须".

我尝试使用此语句,但我得到的错误是AssertionError: expected [ Array(2) ] to have a deep property '#text'.请帮助如何正确地写这个.

使用期望

chai.expect(data.response.error).to.have.deep.property('#text', 'Lastname is mandatory.');
Run Code Online (Sandbox Code Playgroud)

使用应该

data.response.error.should.have.deep.property('#text', 'Lastname is mandatory.');
Run Code Online (Sandbox Code Playgroud)

响应JSON

{
    response: {
        error: [
            {
            '@id': '1000',
            '#text': 'Firstname is mandatory.'
            },
            {
            '@id': '10001',
            '#text': 'Lastname is mandatory.'
            }
        ],
        result: 
        {
            status: '0'
        }
    }
}
Run Code Online (Sandbox Code Playgroud)

mocha.js should.js chai

0
推荐指数
1
解决办法
237
查看次数

标签 统计

chai ×1

google-sheets-api ×1

java ×1

mocha.js ×1

should.js ×1