public class JsonResultTransformer extends Object
.yongchristophertang.engine.web.response.HttpResultTransformers#json| 限定符 | 构造器和说明 |
|---|---|
protected |
JsonResultTransformer()
Accessed via
HttpResultTransformers.json() |
protected |
JsonResultTransformer(String expression) |
| 限定符和类型 | 方法和说明 |
|---|---|
<T> ResultTransform<List<T>> |
list(Class<T> clazz)
Transform the json result to a list with T as its member class.
|
<K,V> ResultTransform<Map<K,V>> |
map(Class<K> keyClass,
Class<V> valueClass)
Transform the json result to a map with K as its key class and V as its value class.
|
<T> ResultTransform<T> |
object(Class<T> clazz)
Transform the json result to an instance of T.
|
ResultTransform<ResultActions> |
parse(String expression)
Parse the result into a sub part json via evaluation of expression.
|
protected JsonResultTransformer()
HttpResultTransformers.json()protected JsonResultTransformer(String expression)
public ResultTransform<ResultActions> parse(String expression)
.yongchristophertang.engine.web.ResultActions instance which incorporate this json as response for further
processing.expression - the JSON path expressionpublic <T> ResultTransform<T> object(Class<T> clazz)
clazz - the type class of transformed objectpublic <T> ResultTransform<List<T>> list(Class<T> clazz)
clazz - the type class of transformed list member objectpublic <K,V> ResultTransform<Map<K,V>> map(Class<K> keyClass, Class<V> valueClass)
keyClass - the type class of transformed map key objectvalueClass - the type class of transformed map value objectCopyright © 2016. All rights reserved.