convertToJson method

String convertToJson(
  1. String camelCasePropertyName
)

Converts a property name from camelCase to JSON naming convention.

Implementation

String convertToJson(String camelCasePropertyName) {
  final convention = jsonNamingConvention ?? CamelCaseConvention();
  return convention.fromCamelCase(camelCasePropertyName);
}