Open vinipsmaker opened 1 year ago
Sounds like broken applications. JSON has no distinction between integer and floating-point numbers.
JSON has no distinction between integer and floating-point numbers.
That is true. However Trial.Protocol still is generating lots of extraneous unneeded textual output.
Good point. The floating-point formatting is Trial.Protocol is rather primitive.
So, I'm developing a Telegram client and I'm using this lib: https://core.telegram.org/tdlib
What I learnt is that a few applications (including tdlib) will reject JSON messages if they include the fractional part (even if it's all zeros). Here's the reply I get from the previous application when sending one of such requests:
So I guess Trial.Protocol's generator needs to detect such patterns and omit the fractional part if it's going to be all zeroes. Otherwise this class of applications will not work.
For my case I can (and will) use a workaround. However I think it's important for Trial.Protocol to up its game, so I'm reporting this issue.