Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bigdecimal与golang中类型对应关系问题? #89

Closed
wongoo opened this issue Jul 1, 2019 · 2 comments
Closed

bigdecimal与golang中类型对应关系问题? #89

wongoo opened this issue Jul 1, 2019 · 2 comments
Labels
Milestone

Comments

@wongoo
Copy link
Contributor

wongoo commented Jul 1, 2019

What happened:
linked to: apache/dubbo-go#109

What you expected to happen:
encode/decode support for java Bigdecimal

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

@wongoo
Copy link
Contributor Author

wongoo commented Jul 2, 2019

the key point is to find out what the encode result of java BigDecimal.

  • if it's encoded as a hessian object, then define a POJO in go to decode
  • if it's encoded as a hessian double, then using float64 in go to decode

@echoiron
Copy link

echoiron commented Jul 2, 2019

type BigDecimal struct {
     ...
}

func (BigDecimal) JavaClassName() string {
	return "java.math.BigDecimal"
}

how to declare in the struct body?

@wongoo wongoo added this to the v1.2.0 milestone Jul 2, 2019
@wongoo wongoo added the urgent label Jul 2, 2019
@wongoo wongoo closed this as completed Jul 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants