convertFromJson method

String convertFromJson(
  1. String jsonPropertyName,
  2. Map json
)

Converts a property name from JSON naming convention to camelCase.

Implementation

String convertFromJson(String jsonPropertyName, Map<dynamic, dynamic> json) {
  final convention = jsonNamingConvention ?? detectNamingConvention(json);
  if (convention == null) return jsonPropertyName;
  return convention.toCamelCase(jsonPropertyName);
}