dotop2 发表于 2018-1-17 17:09:08

json内容选择表达式,schema有特殊要求吗?

内容选择表达式,输上url和schema后,连接字符串有错误,如图




然后,我跟你发我的对比了一下,发现schema里的标签都是在双双引号里,




忽略这个问题,直接往下做
添加数据集,字段:


查询语句也是出错:



你看看这是什么原因呢???谢谢!!!

dotop2 发表于 2018-1-17 17:26:41

我已经试验出来了,是这个问题,现在上边的问题都解决了,但是预览又出错了:

dotop2 发表于 2018-1-17 17:32:17

dotop2 发表于 2018-1-17 17:40:19

可以,直接用浏览器带一个参数可以,我们接口也做了处理

KearneyKang 发表于 2018-1-17 19:28:33

好的!
我会根据您提供的截图做一个验证

KearneyKang 发表于 2018-1-18 14:25:50

本帖最后由 KearneyKang 于 2018-1-18 14:27 编辑

这是传入两个参数的写法:网页端的输入的形式就是如下的模式:http://jsonplaceholder.typicode.com/comments?id=5& &postId=1
表达式的写法如下:
="jsondoc=http://jsonplaceholder.typicode.com/comments?id=" & Parameters!UserId.Value & "&postId=" & Parameters!PostId.Value & ";schemadata={""$schema"": ""http://json-schema.org/draft-04/schema#"",""type"": ""array"",""items"": {       ""type"": ""object"",    ""properties"": {      ""postId"": {      ""type"":    ""integer""      },      ""id"": {      ""type"":    ""integer""      },      ""name"": {      ""type"":    ""string""      },      ""email"": {      ""type"":    ""string""      },      ""body"": {      ""type"":    ""string""      }    },    ""required"": [         ""postId"",      ""id"",      ""name"",         ""email"",      ""body""    ]}}"下面是压缩文件是一个双参数传递的一个报表模板,可供参考:
页: [1]
查看完整版本: json内容选择表达式,schema有特殊要求吗?