我使用的是oracle apex 22.2.0。我必须将包含字符串,数组和布尔值的JSON负载放在一起。我似乎找不到一种方法将页面项转换为布尔值,同时将其与负载的其余部分连接起来。如果我将其转换为类型= boolean的变量,我会得到错误:PLS-00306: wrong number or types of arguments in call to '||'
在apex UI中验证代码时。如果我尝试将变量作为'True'或'False'字符串发送,我会得到错误is_diligence_attested must be a boolean
。我如何才能成功地将这些变量作为布尔值发送而不损害我的json主体的其余部分?
- 在本例中,
v_is_diligence_attested
和v_is_bank_addendum_completed
已被转换为布尔型pl/sql变量。
v_json_data := '{
"client_id":"' || :P290_CLIENT_ID ||
'","secret":"' || :P290_SECRET ||
'","company_name":"' || :P290_COMPANY_NAME ||
'","address":{"city":"' || :P290_CITY || '","street":"' || :P290_STREET || '","region":"' || :P290_REGION || '","postal_code":"' || :P290_POSTAL_CODE || '","country_code":"' || :P290_COUNTRY_CODE || '"},
"application_name":"' || :P290_APPLICATION_NAME ||
'","legal_entity_name":"' || :P290_LEGAL_ENTITIY_NAME ||
'","website":"' || :P290_WEBSITE ||
'","is_diligence_attested":' || v_is_diligence_attested ||
',"is_bank_addendum_completed":' || v_is_bank_addendum_completed ||
',"products":["auth","transactions"],
"technical_contact":{"given_name":"Snoop Dog","family_name":"The OG","email":"[email protected]"},
"billing_contact":{"given_name":"Martha","family_name":"Stewart","email":"[email protected]"},
"customer_support_info":{"email":"[email protected]","phone_number":"111-111-1111","contact_url":"thisaurl.com","link_update_url":"updateurl.com"},
"assets_under_management":{"amount":100,"iso_currency_code":"USD"},
"registration_number":"100"
}';
字符串
1条答案
按热度按时间w8biq8rn1#
字符串