diff --git a/CHANGELOG.md b/CHANGELOG.md index a6cd7bf26..9786326f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Change log - +- [#523](https://github.com/mobilityhouse/ocpp/issues/523) The serialisation of soc to SoC should not occur in camel case if it is existing at the beginning of a field - [#510](https://github.com/mobilityhouse/ocpp/issues/510) v2.0.1 UnitOfMeasureType - Enums missing and update docstring to allow use for variableCharacteristics - [#508](https://github.com/mobilityhouse/ocpp/issues/508) Exception - OccurrenceConstraintViolationError doc string correction diff --git a/ocpp/charge_point.py b/ocpp/charge_point.py index 5e31f3fe7..c5f8cbdcc 100644 --- a/ocpp/charge_point.py +++ b/ocpp/charge_point.py @@ -52,7 +52,7 @@ def snake_to_camel_case(data): if isinstance(data, dict): camel_case_dict = {} for key, value in data.items(): - key = key.replace("soc", "SoC") + key = key.replace("_soc", "SoC") components = key.split("_") key = components[0] + "".join(x[:1].upper() + x[1:] for x in components[1:]) camel_case_dict[key] = snake_to_camel_case(value)