Add support for floating-point numbers#1
Conversation
|
Is this part of the spec somewhere ? Not sure if things changed since I last looked at it but I don't remember the spec supporting either of these types (floating & negative). |
|
I'm honestly not sure about the spec, but I'm working on a project where one of the rpc calls returns a negative number in a JSON and it fails to deserialize. I guess if they can return it, then it's probably allowed by the spec (?) |
|
Specification explicitly says:
You should report the spec violation to the project that uses floating-point numbers on the protocol level. |
|
Well, I just realized that wamp-async-rs tries to deserialize user payload into WAMP-specific limited set of types, and indeed floats just fail. As per the cited part ("The application payloads transmitted by WAMP (e.g. in call arguments or event payloads) may use other types a concrete serialization format supports."), we should use (*) Well, given WAMP supports msgpack and batched protocols, we should may need to implement our own "Value" type, but I suggest we only focus on JSON for now, so |
|
|
This adds support for floating-point numbers or negative integers that are not caught by
WampInteger.