Camel Case
Synopsis
Converts strings to camelCase format.
Schema
- camelcase:
field: <ident>
target_field: <string>
fields: <array>
exclude: <array>
description: <text>
if: <script>
ignore_failure: <boolean>
ignore_missing: <boolean>
on_failure: <processor[]>
on_success: <processor[]>
tag: <string>
Configuration
The following fields are used to define the processor:
| Field | Required | Default | Description |
|---|---|---|---|
field | N | - | Single field to convert to camelCase |
target_field | N | Same as field | Target field to store camelCase result |
fields | N | - | Array of fields to convert to camelCase |
exclude | N | - | Array of fields to exclude from conversion |
description | N | - | Explanatory note |
if | N | - | Condition to run |
ignore_failure | N | false | Continue processing if conversion fails |
ignore_missing | N | false | Skip processing if referenced field doesn't exist |
on_failure | N | - | See Handling Failures |
on_success | N | - | See Handling Success |
tag | N | - | Identifier |
Details
Converts string values to camelCase format by removing spaces, hyphens, underscores, and other separators, then capitalizing the first letter of each word except the first. The processor handles various input formats including snake_case, kebab-case, space-separated words, and mixed formats.
The processor can work on individual fields using the field parameter or multiple fields using the fields array. When processing multiple fields, the exclude parameter allows you to skip specific fields.
camelCase format capitalizes the first letter of each word except the first word, resulting in format like "firstName", "userAccountName", or "dataProcessingComplete". The first letter of the entire string remains lowercase.
The conversion handles Unicode characters properly and preserves non-alphabetic characters in their appropriate positions within the camelCase result.
If the field contains non-string values, the processor will attempt to convert them to strings before applying camelCase conversion. Complex objects or arrays may produce unexpected results.