isValidUnquotedKey

fnbool isValidUnquotedKey(const(char)[] key) @safe

Check whether key can be emitted without quotes in JSON5 (valid identifier).

Rules:

  • First code point must be `$`, _, or a Unicode letter (per std.uni.isAlpha).
  • Subsequent code points must be `$`, _, Unicode letter, or digit (isAlphaNum).