Replaced the src/JSON/Utils/Unicode.dfy code with references to the Unicode library, not only because the latter has more correctness proofs but also because it more safely fails to translate invalid data rather than using replacement characters. This introduces more cases of needing Result wrappers, but most of the library needed them already anyway so it does not impact usability. I've also likely introduced some minor performance regressions compared to the current state of json-merge by using the less-optimized Unicode library, but they should be worth it so this code can be merged, since performance can always be improved later.
Adds a generic UnicodeStrings module to help with this, which should be helpful for other codebases that need to support both modes. This also addresses #111.
Open question: which of the two options in UnicodeStrings.dfy should we use in this repository in general?
By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.
Replaced the
src/JSON/Utils/Unicode.dfy
code with references to theUnicode
library, not only because the latter has more correctness proofs but also because it more safely fails to translate invalid data rather than using replacement characters. This introduces more cases of needingResult
wrappers, but most of the library needed them already anyway so it does not impact usability. I've also likely introduced some minor performance regressions compared to the current state ofjson-merge
by using the less-optimizedUnicode
library, but they should be worth it so this code can be merged, since performance can always be improved later.Adds a generic
UnicodeStrings
module to help with this, which should be helpful for other codebases that need to support both modes. This also addresses #111.Open question: which of the two options in
UnicodeStrings.dfy
should we use in this repository in general?By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.