protectJsonKey function

String? protectJsonKey(
  1. String? name
)

Protect JsonKeys from incorrect symbols, keywords, etc.

Implementation

String? protectJsonKey(String? name) => name?.replaceAll(r'$', r'\$');