Open sim642 opened 1 year ago
Dear sim642,
Thank you for your bug report, the advice, and your kind words. While using a well-known and tested JSON library could be beneficial, it's important to consider that this approach introduces an external dependency. This might complicate the transition from XML-RPC to JSON-RPC due to differences in their interfaces.
The issue you highlighted has been resolved in commit a304e41. We apologize for any inconvenience caused.
Best regards,
Juan Carlos.
The switch from XML-RPC to JSON-RPC broke VPL's ability to properly escape non-printable characters in the output. In particular, this affects ANSI color codes used by many modern compilers in their error messages.
This causes VPL IDE's evaluation button to simply not work, there's no error or anything. Only when evaluating in the grading view, the following error is revealed:
It is obvious that this reinventing of a JSON library is at fault, failing to account for all possible cases: https://github.com/jcrodriguez-dis/vpl-xmlrpc-jail/blob/f04c05d8a391184603641ed07443eeadd60808f0/src/json.h#L212-L238
Instead of reinventing the JSON wheel, just use one of the dozens of C++ JSON libraries which actually work: