can't decode null java date
wongoo opened this issue · 6 comments
wongoo commented
What happened:
link to: apache/dubbo-go#105
What you expected to happen:
enable to decode null java date object
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
aliiohs commented
i will try it.
wongoo commented
@aliiohs first u must ensure what's the encode result of null java date in java, then encode it to a zero go date, eg var _zeroDate time.Time
. pls let me know for any question.
lovepoem commented
I will have a try
lovepoem commented
/**java
/**
* Writes a null value to the stream.
* The null will be written with the following syntax
* <p>
* <code><pre>
* N
* </pre></code>
*
* @param value the string value to write.
*/
@Override
public void writeNull()
throws IOException {
os.write('N');
}
**/
when a field is null , the write stream is N
/**java
/**
* Reads an arbitrary object from the input stream when the type
* is unknown.
*/
public Object readObject(List<Class<?>> expectedTypes)
throws IOException {
int tag = read();
switch (tag) {
case 'N':
return null;
*/
when a stream is N
, then get null in java