I've been working on the JSON RPC framework, which was previously public, but has gone private.
During its development, I've discovered at least 2 bugs in the Delphi RTL regarding UInt64:
Despite the System.JSON framework being in the RTL for several years, it seems it's still not mature enough, because when you need to parse the interpretation of a number (or in the case of the above bugs), you have to rewrite nearly the entire class for TJsonTextReader, and hence, a proposal was filed to update the class.
Hopefully, the Delphi team will fix the issue in the next release of Delphi.
Learn the command line used to compile System.pas in Delphi