永洪社区

标题: webapi 返回json字符串,如何设置 [打印本页]

作者: caoguang    时间: 2023-5-18 16:00
标题: webapi 返回json字符串,如何设置
可以通过配置属性更改WebAPI请求和返回信息的格式,通过webapi.params.json,配置webapi传递参数的格式,true为json,false为xml,默认为xml;通过webapi.result.json配置webapi返回结果的格式,true为json,false为xml,默认为xml。

作者: yhdata_ruby    时间: 2023-5-18 16:09
参考https://www.yonghongtech.com/rea ... =webapi.params.json

文件系统在安装目录Yonghong/bihome/bi.properities配置文件中修改后重启;
数据库系统在管理系统--数据库空间--下载bi.properties修改后上传
作者: caoguang    时间: 2023-5-18 16:38
请问有JSON格式的请求示例吗?
我这边按照这种格式{"xmlData": {"ref": {"type": "user", "name": "caog"}}}
返回了以下错误
{"results":{"result":{"level":"6","message":"参数\"xmlData\"不能为空。"}}}
作者: yhdata_ruby    时间: 2023-5-18 16:50
参考一下这个帖子呢https://club.yonghongtech.com/fo ... amp;_dsign=2275acbe




欢迎光临 永洪社区 (http://club.yonghongtech.com/) Powered by Discuz! X3.4