You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/02/04 07:54:02 UTC

[GitHub] [dubbo-go-hessian2] wssjdi opened a new issue #257: Java服务端的LocalDateTime,Dubbo-Go客户端接收到的响应内容被转换成了map类型

wssjdi opened a new issue #257:
URL: https://github.com/apache/dubbo-go-hessian2/issues/257


   <!-- Please only use this template for submitting enhancement requests -->
   
   **What would you like to be added**:
   
   Java Server PoJO:
       private LocalDate 				birthday = LocalDate.now();
       private java.sql.Time			        lastLoginTime = Time.valueOf("13:45:56");
       private LocalDateTime 			registerDate = LocalDateTime.now();
   
   Dubbo-Go Client Recive Response:
   {
       "birthday": {
           "chronology": {
               "calendarType": "iso8601",
               "id": "ISO"
           },
           "dayOfMonth": 1,
           "dayOfWeek": "MONDAY",
           "dayOfYear": 1,
           "era": "CE",
           "leapYear": false,
           "month": "JANUARY",
           "monthValue": 1,
           "year": 1900
       },
       "lastLoginTime": "1970-01-01T11:41:30+08:00",
       "registerDate": {
           "chronology": {
               "calendarType": "iso8601",
               "id": "ISO"
           },
           "dayOfMonth": 29,
           "dayOfWeek": "WEDNESDAY",
           "dayOfYear": 333,
           "hour": 11,
           "minute": 41,
           "month": "NOVEMBER",
           "monthValue": 11,
           "nano": 0,
           "second": 30,
           "year": 2017
       }
   }
   经测试发现在客户端接收到的响应内容中birthday、registerDate两个字段的类型为map,如此无法根据其字段类型,dubbo-go客户端做一些处理
   
   **Why is this needed**:
   如何在客户端将接收到的响应内容中的birthday、registerDate两个字段转换为struct类型(java8_time.LocalDateTime)或者ptr类型,而不是使用map类型?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-hessian2] wssjdi commented on issue #257: Java服务端的LocalDateTime,Dubbo-Go客户端接收到的响应内容被转换成了map类型

Posted by GitBox <gi...@apache.org>.
wssjdi commented on issue #257:
URL: https://github.com/apache/dubbo-go-hessian2/issues/257#issuecomment-773111062


   在示例找到了java8_time.LocalDateTime的encode方法,没有找到对应的decode方法,后续版本是否会提供和JavaSqlTimeSerializer一样的序列化工具?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-hessian2] wongoo commented on issue #257: Java服务端的LocalDateTime,Dubbo-Go客户端接收到的响应内容被转换成了map类型

Posted by GitBox <gi...@apache.org>.
wongoo commented on issue #257:
URL: https://github.com/apache/dubbo-go-hessian2/issues/257#issuecomment-773735978


   @wssjdi  java8 time supported from v1.7.0, see  https://github.com/apache/dubbo-go-hessian2/blob/1.8/CHANGE.md.
   And u can upgrade hessian2 independently.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-hessian2] wssjdi commented on issue #257: Java服务端的LocalDateTime,Dubbo-Go客户端接收到的响应内容被转换成了map类型

Posted by GitBox <gi...@apache.org>.
wssjdi commented on issue #257:
URL: https://github.com/apache/dubbo-go-hessian2/issues/257#issuecomment-773110600






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-hessian2] wssjdi commented on issue #257: Java服务端的LocalDateTime,Dubbo-Go客户端接收到的响应内容被转换成了map类型

Posted by GitBox <gi...@apache.org>.
wssjdi commented on issue #257:
URL: https://github.com/apache/dubbo-go-hessian2/issues/257#issuecomment-773110600


   在示例找到了java8_time.LocalDateTime的encode方法,没有找到对应的decode方法,后续版本是否会提供和JavaSqlTimeSerializer一样的序列化工具?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-hessian2] wssjdi closed issue #257: Java服务端的LocalDateTime,Dubbo-Go客户端接收到的响应内容被转换成了map类型

Posted by GitBox <gi...@apache.org>.
wssjdi closed issue #257:
URL: https://github.com/apache/dubbo-go-hessian2/issues/257


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-hessian2] wssjdi closed issue #257: Java服务端的LocalDateTime,Dubbo-Go客户端接收到的响应内容被转换成了map类型

Posted by GitBox <gi...@apache.org>.
wssjdi closed issue #257:
URL: https://github.com/apache/dubbo-go-hessian2/issues/257


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-hessian2] AlexStocks closed issue #257: Java服务端的LocalDateTime,Dubbo-Go客户端接收到的响应内容被转换成了map类型

Posted by GitBox <gi...@apache.org>.
AlexStocks closed issue #257:
URL: https://github.com/apache/dubbo-go-hessian2/issues/257


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-hessian2] wssjdi removed a comment on issue #257: Java服务端的LocalDateTime,Dubbo-Go客户端接收到的响应内容被转换成了map类型

Posted by GitBox <gi...@apache.org>.
wssjdi removed a comment on issue #257:
URL: https://github.com/apache/dubbo-go-hessian2/issues/257#issuecomment-773110600


   在示例找到了java8_time.LocalDateTime的encode方法,没有找到对应的decode方法,后续版本是否会提供和JavaSqlTimeSerializer一样的序列化工具?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-hessian2] wssjdi commented on issue #257: Java服务端的LocalDateTime,Dubbo-Go客户端接收到的响应内容被转换成了map类型

Posted by GitBox <gi...@apache.org>.
wssjdi commented on issue #257:
URL: https://github.com/apache/dubbo-go-hessian2/issues/257#issuecomment-773732926


   > > @wssjdi it support decoding LocalDateTime, ref the following link. I can't get why it does not work for you, u can provide more details, eg the full java pojo object, the definition of golang struct.
   > > https://github.com/apache/dubbo-go-hessian2/blob/c0524556634e72a301a31d1023a2181de1f0eadd/java8_time_test.go#L29
   > > 
   > > https://github.com/apache/dubbo-go-hessian2/blob/c0524556634e72a301a31d1023a2181de1f0eadd/test_hessian/src/main/java/test/TestJava8Time.java#L36
   > 
   > Thanks For Your Answer;
   > 我项目中使用的是Dubbo-Go,Dubbo-go的最新版本1.5.5,依赖的dubbo-go-hessian2版本为v1.7.0,可能是版本过低原因导致的
   > ![image](https://user-images.githubusercontent.com/4423260/106979787-01567580-679a-11eb-9789-215e8db5ef8b.png)
   
   dubbo-go@1.5.5的部分依赖项:
   ... ...
   github.com/apache/dubbo-go@v1.5.5 github.com/alibaba/sentinel-golang@v0.6.2
   github.com/apache/dubbo-go@v1.5.5 github.com/apache/dubbo-getty@v1.3.10
   github.com/apache/dubbo-go@v1.5.5 github.com/apache/dubbo-go-hessian2@v1.7.0
   github.com/apache/dubbo-go@v1.5.5 github.com/coreos/etcd@v3.3.25+incompatible
   github.com/apache/dubbo-go@v1.5.5 github.com/creasty/defaults@v1.5.1
   github.com/apache/dubbo-go@v1.5.5 github.com/dubbogo/go-zookeeper@v1.0.2
   github.com/apache/dubbo-go@v1.5.5 github.com/dubbogo/gost@v1.9.5
   github.com/apache/dubbo-go@v1.5.5 github.com/elazarl/go-bindata-assetfs@v1.0.0
   ... ...


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-hessian2] wssjdi removed a comment on issue #257: Java服务端的LocalDateTime,Dubbo-Go客户端接收到的响应内容被转换成了map类型

Posted by GitBox <gi...@apache.org>.
wssjdi removed a comment on issue #257:
URL: https://github.com/apache/dubbo-go-hessian2/issues/257#issuecomment-773110600


   在示例找到了java8_time.LocalDateTime的encode方法,没有找到对应的decode方法,后续版本是否会提供和JavaSqlTimeSerializer一样的序列化工具?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-hessian2] wongoo commented on issue #257: Java服务端的LocalDateTime,Dubbo-Go客户端接收到的响应内容被转换成了map类型

Posted by GitBox <gi...@apache.org>.
wongoo commented on issue #257:
URL: https://github.com/apache/dubbo-go-hessian2/issues/257#issuecomment-773280225


   @wssjdi  it support decoding LocalDateTime, ref the following link. I can't get why it does not work for you, u can provide more details, eg the full java pojo object, the definition of golang struct.
   
   https://github.com/apache/dubbo-go-hessian2/blob/c0524556634e72a301a31d1023a2181de1f0eadd/java8_time_test.go#L29
   https://github.com/apache/dubbo-go-hessian2/blob/c0524556634e72a301a31d1023a2181de1f0eadd/test_hessian/src/main/java/test/TestJava8Time.java#L36


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-hessian2] wssjdi commented on issue #257: Java服务端的LocalDateTime,Dubbo-Go客户端接收到的响应内容被转换成了map类型

Posted by GitBox <gi...@apache.org>.
wssjdi commented on issue #257:
URL: https://github.com/apache/dubbo-go-hessian2/issues/257#issuecomment-773732384


   > @wssjdi it support decoding LocalDateTime, ref the following link. I can't get why it does not work for you, u can provide more details, eg the full java pojo object, the definition of golang struct.
   > 
   > https://github.com/apache/dubbo-go-hessian2/blob/c0524556634e72a301a31d1023a2181de1f0eadd/java8_time_test.go#L29
   > 
   > 
   > https://github.com/apache/dubbo-go-hessian2/blob/c0524556634e72a301a31d1023a2181de1f0eadd/test_hessian/src/main/java/test/TestJava8Time.java#L36
   
   Thanks For Your Answer;
   我项目中使用的是Dubbo-Go,Dubbo-go的最新版本1.5.5,依赖的dubbo-go-hessian2版本为v1.7.0,可能是版本过低原因导致的
   ![image](https://user-images.githubusercontent.com/4423260/106979787-01567580-679a-11eb-9789-215e8db5ef8b.png)
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-hessian2] wongoo commented on issue #257: Java服务端的LocalDateTime,Dubbo-Go客户端接收到的响应内容被转换成了map类型

Posted by GitBox <gi...@apache.org>.
wongoo commented on issue #257:
URL: https://github.com/apache/dubbo-go-hessian2/issues/257#issuecomment-773280225






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org