Closed taraskuzyk closed 1 year ago
I'll review - looks good, thanks!
Hi taraskuzyk, I started writing a test for the new code, but it got me thinking. The function is called "toJSON" but it's not actually returning JSON, it's returning an object. This is a problem because we shouldn't create a function with a misleading name. Is your use case to actually have a JSON string, or is it to have a object that's easier to inspect?
The method allows for easier extraction of data from the packet. It is based on the already existing .toString() method.