Skip to main content
Version: 1.4.0

Dot Case

Text Processing String Manipulation

Synopsis

Converts strings to dot.case format.

Schema

- dotcase:
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:

FieldRequiredDefaultDescription
fieldN-Single field to convert to dot.case
target_fieldNSame as fieldTarget field to store dot.case result
fieldsN-Array of fields to convert to dot.case
excludeN-Array of fields to exclude from conversion
descriptionN-Explanatory note
ifN-Condition to run
ignore_failureNfalseContinue processing if conversion fails
ignore_missingNfalseSkip processing if referenced field doesn't exist
on_failureN-See Handling Failures
on_successN-See Handling Success
tagN-Identifier

Details

Converts string values to dot.case format by replacing spaces, hyphens, underscores, and other separators with dots, then converting all characters to lowercase. This format is commonly used in configuration files, namespacing, and object notation.

The processor handles various input formats and normalizes them to the consistent dot.case style with lowercase letters separated by dots.

note

dot.case format uses dots as separators and converts all text to lowercase, resulting in format like "user.name", "api.response.data", or "system.config.value".

The processor preserves the logical word boundaries from the input while standardizing the format for consistent usage in configuration systems or hierarchical naming.

warning

Excessive dots or special characters in the input may result in multiple consecutive dots in the output. The processor does not automatically clean up redundant separators.

Examples

Basic Conversion

Converting field name to dot.case...

{
"field_name": "user_account_settings"
}
- dotcase:
field: field_name
target_field: dot_name

converts to dot notation:

{
"field_name": "user_account_settings",
"dot_name": "user.account.settings"
}

Mixed Separators

Normalizing mixed separators to dots...

{
"config_key": "api-response_data with spaces"
}
- dotcase:
field: config_key

standardizes all separators to dots:

{
"config_key": "api.response.data.with.spaces"
}

Configuration Namespace

Creating configuration namespace format...

{
"service_name": "User Authentication Service"
}
- dotcase:
field: service_name
target_field: namespace

creates namespace-style identifier:

{
"service_name": "User Authentication Service",
"namespace": "user.authentication.service"
}

Multiple Fields

Converting multiple fields to dot.case...

{
"module_name": "data_processor",
"component_type": "log-parser",
"version_info": "v1_2_3"
}
- dotcase:
fields: ["module_name", "component_type", "version_info"]

processes all specified fields:

{
"module_name": "data.processor",
"component_type": "log.parser",
"version_info": "v1.2.3"
}