public interface ContextSerializer<T>
extends org.noear.solon.core.serialize.Serializer<T>
| Modifier and Type | Method and Description |
|---|---|
default boolean |
bodyRequired()
必须要 body
|
default Object |
deserializeFromBody(org.noear.solon.core.handle.Context ctx)
反序列化从
|
Object |
deserializeFromBody(org.noear.solon.core.handle.Context ctx,
Type toType)
反序列化从
|
boolean |
matched(org.noear.solon.core.handle.Context ctx,
String mime)
匹配
|
String |
mimeType()
媒体类型
|
void |
serializeToBody(org.noear.solon.core.handle.Context ctx,
Object data)
序列化到
|
boolean matched(org.noear.solon.core.handle.Context ctx,
String mime)
ctx - 上下文mime - String mimeType()
mimeType in interface org.noear.solon.core.serialize.Serializer<T>default boolean bodyRequired()
void serializeToBody(org.noear.solon.core.handle.Context ctx,
Object data)
throws IOException
ctx - 请求上下文data - 数据IOExceptionObject deserializeFromBody(org.noear.solon.core.handle.Context ctx, @Nullable Type toType) throws IOException
ctx - 请求上下文toType - 目标类型IOExceptiondefault Object deserializeFromBody(org.noear.solon.core.handle.Context ctx) throws IOException
ctx - 请求上下文IOExceptionCopyright © 2025. All rights reserved.