dubbo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexsto...@apache.org
Subject [dubbo-go-hessian2] branch master updated: Add: java8 time
Date Fri, 09 Oct 2020 06:35:55 GMT
This is an automated email from the ASF dual-hosted git repository.

alexstocks pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo-go-hessian2.git


The following commit(s) were added to refs/heads/master by this push:
     new c0c78ba  Add: java8 time
c0c78ba is described below

commit c0c78ba6b7fbf2a0be312b65baaa38ba08c0b8d4
Author: AlexStocks <alexstocks@foxmail.com>
AuthorDate: Fri Oct 9 14:35:56 2020 +0800

    Add: java8 time
---
 README.md | 29 ++++++++++++++++-------------
 1 file changed, 16 insertions(+), 13 deletions(-)

diff --git a/README.md b/README.md
index 2887670..3733fdb 100644
--- a/README.md
+++ b/README.md
@@ -13,7 +13,7 @@
 
 It's a golang hessian library used by [Apache/dubbo-go](https://github.com/apache/dubbo-go).
 
-There is a big performance improvement, and some bugs fix for v1.6.0, 
+There is a big performance improvement, and some bugs fix for v1.6.0,
 thanks to [micln](https://github.com/micln), [pantianying](https://github.com/pantianying),
[zonghaishang](https://github.com/zonghaishang),
  [willson-chen](https://github.com/willson-chen), [champly](https://github.com/champly).
 
@@ -40,10 +40,10 @@ Cross languages message definition should be careful, the following situations
s
 
 So we can maintain a cross language type mapping:
 
-| hessian type |  java type  |  golang type | 
-| --- | --- | --- | 
-| **null** | null | nil | 
-| **binary** | byte[] | []byte | 
+| hessian type |  java type  |  golang type |
+| --- | --- | --- |
+| **null** | null | nil |
+| **binary** | byte[] | []byte |
 | **boolean** | boolean | bool |
 | **date** | java.util.Date | time.Time |
 | **double** | double | float64 |
@@ -53,9 +53,12 @@ So we can maintain a cross language type mapping:
 | **list** | java.util.List | slice |
 | **map** | java.util.Map | map |
 | **object** | custom define object | custom define struct|
-| **OTHER COMMON USING TYPE** | | | 
+| **OTHER COMMON USING TYPE** | | |
 | **big decimal** | java.math.BigDecimal | github.com/dubbogo/gost/math/big/Decimal |
 | **big integer** | java.math.BigInteger | github.com/dubbogo/gost/math/big/Integer |
+| **date** | java.sql.Date | github.com/apache/dubbo-go-hessian2/java_sql_time/Date |
+| **date** | java.sql.Time | github.com/apache/dubbo-go-hessian2/java_sql_time/Time |
+| **date** | all java8 sdk time | github.com/apache/dubbo-go-hessian2/java8_time |
 
 ## reference
 
@@ -253,13 +256,13 @@ func (j *JavaHashSet) Set(v []interface{}) {
 	j.value = v
 }
 
-//should be the same as the class name of the Java collection 
+//should be the same as the class name of the Java collection
 func (j *JavaHashSet) JavaClassName() string {
 	return "java.util.HashSet"
 }
 
 func init() {
-        //register your struct so that hessian can recognized it when encoding and decoding

+        //register your struct so that hessian can recognized it when encoding and decoding
 	SetCollectionSerialize(&JavaHashSet{})
 }
 ```
@@ -272,7 +275,7 @@ func init() {
 
 + **Avoid fields with the same name in multiple parent struct**
 
-The following struct `C` have inherited field `Name`(default from the first parent), 
+The following struct `C` have inherited field `Name`(default from the first parent),
 but it's confused in logic.
 
 ```go
@@ -286,13 +289,13 @@ type C struct {
 
 + **Avoid inheritance for a pointer of struct**
 
-The following definition is valid for golang syntax, 
-but the parent will be nil when create a new Dog, like `dog := Dog{}`, 
-which will not happen in java inheritance, 
+The following definition is valid for golang syntax,
+but the parent will be nil when create a new Dog, like `dog := Dog{}`,
+which will not happen in java inheritance,
 and is also not supported by `go-hessian2`.
 
 ```go
 type Dog struct {
 	*Animal
 }
-```
\ No newline at end of file
+```


Mime
View raw message