杰森:
{
"im:rating": {
"label": "1"
}
}
Run Code Online (Sandbox Code Playgroud)
在尝试在 groovy 中使用 Jsonpath 时如果我使用这个'$.im: rating'
它显示以下错误
Run Code Online (Sandbox Code Playgroud)Caused by: com.nebhale.jsonpath.InvalidJsonPathExpressionException: Illegal字符 'PathCharacter [类型 = [],值 =:,位置 = 4]' $.im:评级 ----^ 非法字符 'PathCharacter [类型 = [SIMPLE_NAME_CHARACTER,LETTER,COMPLEX_NAME_CHARACTER],值 = r,位置 = 5 ]' $.im: rating -----^ 非法字符 'PathCharacter [types=[SIMPLE_NAME_CHARACTER, LETTER, COMPLEX_NAME_CHARACTER], value=a,position=6]' $.im: rating ------^ 非法字符 'PathCharacter [types=[SIMPLE_NAME_CHARACTER, LETTER, COMPLEX_NAME_CHARACTER], value=t,position=7]' $.im: rating -------^ 非法字符 'PathCharacter [types=[SIMPLE_NAME_CHARACTER, LETTER, COMPLEX_NAME_CHARACTER] ,值=i,位置=8]'$.im:评级--------^非法字符'PathCharacter [类型=[SIMPLE_NAME_CHARACTER,LETTER,COMPLEX_NAME_CHARACTER],值=n,位置=9]'$。 im:评级 ---------^ 非法字符 'PathCharacter [类型=[SIMPLE_NAME_CHARACTER,LETTER,COMPLEX_NAME_CHARACTER],值=g,位置=10]' $.im:评级 -------- --^
Run Code Online (Sandbox Code Playgroud)at com.nebhale.jsonpath.JsonPath.compile(JsonPath.java:85) at com.nebhale.jsonpath.JsonPath.read(JsonPath.java:182)
如果this.state.task.status == 'Completed'我想隐藏按钮(比如添加 display: none 属性)
代码:
<Button size="small"
style={{display:this.state.task.status == "Completed" ? "none":""}}
style={textColor} >Mark as Completed</Button>
Run Code Online (Sandbox Code Playgroud)
textColor是另一种工作正常的样式。
我正在使用spring webclient发出带有{comment_count}的url的Facebook图形api请求
但是,得到这个例外
java.lang.IllegalArgumentException: Not enough variable values available to expand reactive spring
Run Code Online (Sandbox Code Playgroud)
代码段:
import org.springframework.stereotype.Component;
import org.springframework.web.reactive.function.client.WebClient;
import reactor.core.publisher.Mono;
@Component
public class Stackoverflow {
WebClient client = WebClient.create();
public Mono<Post> fetchPost(String url) {
// Url contains "comments{comment_count}"
return client.get().uri(url).retrieve()
.bodyToMono(Post.class);
}
}
Run Code Online (Sandbox Code Playgroud)
我知道resttemplate的解决方案,但是我需要使用spring webclient。
illegalargumentexception facebook-graph-api spring-boot spring-webflux spring-webclient
css ×1
groovy ×1
json ×1
jsonparser ×1
jsonpath ×1
material-ui ×1
parsing ×1
reactjs ×1
spring-boot ×1