public class AnyEntrySchema extends Object implements SchemaEx<Object>
| Constructor and Description |
|---|
AnyEntrySchema(ProtoMapper protoMapper) |
| Modifier and Type | Method and Description |
|---|---|
protected RootDeserializer<Object> |
createRootDeserializerFromCanonicaName(String msgCanonicalName) |
Object |
deseriaze(InputEx input) |
protected String |
getInputActualTypeName(Object input) |
void |
init() |
protected void |
jsonExtend(OutputEx output,
Object input) |
protected Object |
jsonExtendMergeFrom(String typeUrl,
byte[] bytes) |
void |
mergeFrom(InputEx input,
Object message) |
protected void |
standardPack(OutputEx output,
Object message,
String canonicalName,
RootSerializer valueSerializer) |
protected Object |
standardUnpack(String typeUrl,
byte[] bytes) |
void |
writeTo(OutputEx output,
Object value)
if message is type of CustomGeneric<User>
we can not get any information of "User" from message.getClass()
when use with ServiceComb
proto definition convert from swagger, the proto type will be "CustomGenericUser"
is not match to "CustomGeneric"
so message will be serialized with json schema
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitmessageNamenewMessagepublic AnyEntrySchema(ProtoMapper protoMapper)
public void mergeFrom(InputEx input, Object message) throws IOException
mergeFrom in interface SchemaReader<Object>IOExceptionpublic Object deseriaze(InputEx input) throws IOException
IOExceptionprotected Object standardUnpack(String typeUrl, byte[] bytes) throws IOException
IOExceptionprotected RootDeserializer<Object> createRootDeserializerFromCanonicaName(String msgCanonicalName)
protected Object jsonExtendMergeFrom(String typeUrl, byte[] bytes) throws IOException
IOExceptionpublic void writeTo(OutputEx output, Object value) throws IOException
if message is type of CustomGeneric<User> we can not get any information of "User" from message.getClass() when use with ServiceComb proto definition convert from swagger, the proto type will be "CustomGenericUser" is not match to "CustomGeneric" so message will be serialized with json schema
writeTo in interface SchemaWriter<Object>output - value - IOExceptionprotected void standardPack(OutputEx output, Object message, String canonicalName, RootSerializer valueSerializer) throws IOException
IOExceptionprotected void jsonExtend(OutputEx output, Object input) throws IOException
IOExceptionCopyright © 2017–2019 The Apache Software Foundation. All rights reserved.