Package deltix.qsrv.util.json
Class JSONRawMessageParser
- java.lang.Object
-
- deltix.qsrv.hf.pub.UnboundWriter<com.google.gson.JsonElement>
-
- deltix.qsrv.util.json.JSONRawMessageParser
-
public class JSONRawMessageParser extends UnboundWriter<com.google.gson.JsonElement>
Json parser into InstrumentMessage message.
-
-
Field Summary
-
Fields inherited from class deltix.qsrv.hf.pub.UnboundWriter
typePropertyName
-
-
Constructor Summary
Constructors Constructor Description JSONRawMessageParser(RecordClassDescriptor[] descriptors)
JSONRawMessageParser(RecordClassDescriptor[] descriptors, java.lang.String typePropertyName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.Object
getObjectType(com.google.gson.JsonElement value)
Return object type specification: can be RecordClassDescriptor instance, name of RecordClassDescriptor, GUID of RecordClassDescriptorRawMessage
parse(com.google.gson.JsonObject object)
protected long
parseDateTime(java.lang.String value)
protected long
parseNanoDateTime(java.lang.String value)
protected int
parseTime(java.lang.String value)
void
writeArray(com.google.gson.JsonElement value, ArrayDataType type, WritableValue w)
void
writeField(com.google.gson.JsonElement value, DataType type, WritableValue w)
void
writeObject(com.google.gson.JsonElement value, UnboundEncoder encoder)
-
Methods inherited from class deltix.qsrv.hf.pub.UnboundWriter
matchObjectType, matchObjectType, writeArray, writeField, writeObject
-
-
-
-
Constructor Detail
-
JSONRawMessageParser
public JSONRawMessageParser(RecordClassDescriptor[] descriptors)
-
JSONRawMessageParser
public JSONRawMessageParser(RecordClassDescriptor[] descriptors, java.lang.String typePropertyName)
-
-
Method Detail
-
writeField
public void writeField(com.google.gson.JsonElement value, DataType type, WritableValue w)
- Overrides:
writeField
in classUnboundWriter<com.google.gson.JsonElement>
-
parseDateTime
protected long parseDateTime(java.lang.String value)
-
parseNanoDateTime
protected long parseNanoDateTime(java.lang.String value)
-
parseTime
protected int parseTime(java.lang.String value)
-
getObjectType
protected java.lang.Object getObjectType(com.google.gson.JsonElement value)
Description copied from class:UnboundWriter
Return object type specification: can be RecordClassDescriptor instance, name of RecordClassDescriptor, GUID of RecordClassDescriptor- Overrides:
getObjectType
in classUnboundWriter<com.google.gson.JsonElement>
- Parameters:
value
- values container- Returns:
- object type specification
-
writeArray
public void writeArray(com.google.gson.JsonElement value, ArrayDataType type, WritableValue w)
- Overrides:
writeArray
in classUnboundWriter<com.google.gson.JsonElement>
-
writeObject
public void writeObject(com.google.gson.JsonElement value, UnboundEncoder encoder)
- Overrides:
writeObject
in classUnboundWriter<com.google.gson.JsonElement>
-
parse
public RawMessage parse(com.google.gson.JsonObject object)
-
-