_identPartChar

private fnbool _identPartChar(dchar dc) @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). ES5 IdentifierPart membership for a decoded code point.

Beyond alphanumerics, _, `$`, ZWNJ and ZWJ, ECMAScript also allows combining marks (Unicode categories Mn/Mc/Me) and connector punctuation (Pc) inside identifiers — JSON5 inherits these rules (N048).