jcelliott / turnpike

Go implementation of a WAMP (Web Application Messaging Protocol) client and router
MIT License
258 stars 88 forks source link

Offer a UseNumber option #129

Open johnSchnake opened 8 years ago

johnSchnake commented 8 years ago

Since the library uses interface{} types when deserializing messages, integers are all cast to float64. When printing out values in Go, if the value is large enough it prints into scientific notation then.

If there was an option to use UseNumber they would stay as json.Number types which could be parsed as needed downstream.

avdva commented 7 years ago

Hi, here you can find my first implementation of this. It's pretty simple, but worked for me. Use turnpike.JSONNUMBER as a serializer.