我正在尝试访问API的内容,我需要使用RestTemplate发送URL.
String url1 = "http://api.example.com/Search?key=52ddafbe3ee659bad97fcce7c53592916a6bfd73&term=&limit=100&sort={\"price\":\"desc\"}";
OutputPage page = restTemplate.getForObject(url1, OutputPage .class);
Run Code Online (Sandbox Code Playgroud)
但是,我收到以下错误.
Exception in thread "main" java.lang.IllegalArgumentException: Not enough variable values available to expand '"price"'
at org.springframework.web.util.UriComponents$VarArgsTemplateVariables.getValue(UriComponents.java:284)
at org.springframework.web.util.UriComponents.expandUriComponent(UriComponents.java:220)
at org.springframework.web.util.HierarchicalUriComponents.expandInternal(HierarchicalUriComponents.java:317)
at org.springframework.web.util.HierarchicalUriComponents.expandInternal(HierarchicalUriComponents.java:46)
at org.springframework.web.util.UriComponents.expand(UriComponents.java:162)
at org.springframework.web.util.UriTemplate.expand(UriTemplate.java:119)
at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:501)
at org.springframework.web.client.RestTemplate.getForObject(RestTemplate.java:239)
at hello.Application.main(Application.java:26)
Run Code Online (Sandbox Code Playgroud)
如果我删除排序条件,它正常工作.我需要使用排序条件解析JSON.任何帮助都感激不尽.
谢谢
我有一个SAS数据集,让我们说:
No d1 d2 d3 ... dn
1 2 3 4 ... n1
2 3 4 5 ... n2
3 4 5 6 ... n3
Run Code Online (Sandbox Code Playgroud)
我现在需要找到SAS中所有列的平均值.有办法吗?
列数不是特定的.如果我需要d1- dn列的平均值,那么我期望的输出是:
3 4 5 .. (n1+n2+n3)/3
Run Code Online (Sandbox Code Playgroud)
有没有办法在数据步骤或使用proc sql或proc iml?