| 限定符和类型 | 字段和说明 |
|---|---|
protected FastJsonConfig |
fastJsonConfig |
| 构造器和说明 |
|---|
FastJsonProvider()
Can serialize/deserialize all types.
|
FastJsonProvider(boolean annotated)
Only serialize/deserialize all types annotated with
FastJsonType. |
FastJsonProvider(Class<?>[] clazzes)
Only serialize/deserialize all types in clazzes.
|
FastJsonProvider(String[] scanpackages)
Only serialize/deserialize all types in scanpackages.
|
FastJsonProvider(String[] scanpackages,
boolean annotated)
Only serialize/deserialize all types in scanpackages.
|
| 限定符和类型 | 方法和说明 |
|---|---|
long |
getSize(Object t,
Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType)
Method that JAX-RS container calls to try to figure out serialized length
of given value. always return -1 to denote "not known".
|
static void |
handleResovleTask(com.alibaba.fastjson.parser.DefaultJSONParser parser,
Object value) |
protected boolean |
hasMatchingMediaType(javax.ws.rs.core.MediaType mediaType)
Check media type like "application/json".
|
FastJsonProvider |
init(FastJsonConfig fastJsonConfig)
Init this provider with more fastjson configurations.
|
boolean |
isReadable(Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType)
Method that JAX-RS container calls to try to check whether values of
given type (and media type) can be deserialized by this provider.
|
protected boolean |
isValidType(Class<?> type,
Annotation[] classAnnotations)
Check whether a class can be serialized or deserialized.
|
boolean |
isWriteable(Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType)
Method that JAX-RS container calls to try to check whether given value
(of specified type) can be serialized by this provider.
|
static <T> T |
parseObject(InputStream entityStream,
Type clazz,
com.alibaba.fastjson.parser.ParserConfig config,
com.alibaba.fastjson.parser.deserializer.ParseProcess processor,
int featureValues,
com.alibaba.fastjson.parser.Feature[] features) |
Object |
readFrom(Class<Object> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType,
javax.ws.rs.core.MultivaluedMap<String,String> httpHeaders,
InputStream entityStream)
Method that JAX-RS container calls to deserialize given value.
|
String |
toJSONString(Object object,
com.alibaba.fastjson.serializer.SerializeFilter filter,
com.alibaba.fastjson.serializer.SerializerFeature[] features) |
void |
writeTo(Object t,
Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType,
javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders,
OutputStream entityStream)
Method that JAX-RS container calls to serialize given value.
|
protected FastJsonConfig fastJsonConfig
public FastJsonProvider()
public FastJsonProvider(boolean annotated)
FastJsonType.public FastJsonProvider(String[] scanpackages)
public FastJsonProvider(String[] scanpackages, boolean annotated)
public FastJsonProvider(Class<?>[] clazzes)
public FastJsonProvider init(FastJsonConfig fastJsonConfig)
protected boolean isValidType(Class<?> type, Annotation[] classAnnotations)
clazz - class need to checkprotected boolean hasMatchingMediaType(javax.ws.rs.core.MediaType mediaType)
mediaType - media typepublic String toJSONString(Object object, com.alibaba.fastjson.serializer.SerializeFilter filter, com.alibaba.fastjson.serializer.SerializerFeature[] features)
public static final <T> T parseObject(InputStream entityStream, Type clazz, com.alibaba.fastjson.parser.ParserConfig config, com.alibaba.fastjson.parser.deserializer.ParseProcess processor, int featureValues, com.alibaba.fastjson.parser.Feature[] features)
public static void handleResovleTask(com.alibaba.fastjson.parser.DefaultJSONParser parser,
Object value)
public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
isWriteable 在接口中 javax.ws.rs.ext.MessageBodyWriter<Object>public long getSize(Object t, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
getSize 在接口中 javax.ws.rs.ext.MessageBodyWriter<Object>public void writeTo(Object t, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders, OutputStream entityStream) throws IOException, javax.ws.rs.WebApplicationException
writeTo 在接口中 javax.ws.rs.ext.MessageBodyWriter<Object>IOExceptionjavax.ws.rs.WebApplicationExceptionpublic boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
isReadable 在接口中 javax.ws.rs.ext.MessageBodyReader<Object>public Object readFrom(Class<Object> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,String> httpHeaders, InputStream entityStream) throws IOException, javax.ws.rs.WebApplicationException
readFrom 在接口中 javax.ws.rs.ext.MessageBodyReader<Object>IOExceptionjavax.ws.rs.WebApplicationExceptionCopyright © 2014 colobu. All Rights Reserved.