Repository navigation
v1.1.0
The generator no longer depends on System.Text.Json. See the README for documentation.
Changes
- No System.Text.Json dependency. Translation files are read by a small built-in JSON reader. The package now contains only the generator, the props files and the README. Earlier packages shipped System.Text.Json with only some of its dependencies, which could fail to load in compilers hosted on .NET Framework (Visual Studio).
- Diagnostics point at the error. I18N001 (invalid JSON) is reported at the exact position, with line and column in the message. I18N003 (unsupported value) is reported on the property name.
- Lone surrogates are reported. A lone surrogate in a translation file, escaped (
"\uD83D") or raw, now gives I18N001. Before, an escaped one crashed the generator. - Fix: line separators and control characters in values. U+0085, U+2028, U+2029 and other control characters are now escaped in generated code. In 1.0.0, a U+2028 in a value broke the build with CS1010.
The JSON rules are unchanged: no comments, no trailing commas, a single root object, depth up to 64. I18N001 messages have new wording.
Pull requests
- Replace System.Text.Json with a built-in JSON reader in #12
Full Changelog: v1.0.0...v1.1.0