Class StringDeserializationProblemHandler

java.lang.Object
com.fasterxml.jackson.databind.deser.DeserializationProblemHandler
overit.geocall.model.format.StringDeserializationProblemHandler

public class StringDeserializationProblemHandler extends DeserializationProblemHandler
Custom problem handler for Jackson deserialization that handles the case where an array is encountered when expecting a String value.

This handler converts arrays to comma-separated strings, which is particularly useful for resolving deserialization issues in DynOHandlerMethodArgumentResolver when query parameters containing commas are processed.

Use case: When a query parameter like name=John,Doe is processed, it gets converted to an array ["John", "Doe"] due to comma detection. This handler automatically converts such arrays back to "John,Doe" when deserializing into String fields.

Behavior:

  • Arrays like ["value1", "value2", "value3"] become "value1,value2,value3"
  • Single-element arrays like ["singleValue"] become "singleValue"
  • Empty arrays [] become empty strings ""
  • Arrays with null values are handled gracefully (nulls become empty strings)
  • If conversion fails, Jackson falls back to the original error message

Activation: This handler is only active when patch PATCH_190925 is enabled. See Patches.PATCH_190925 for more details.

Since:
13.0
See Also:
  • Patches.PATCH_190925
  • DynOHandlerMethodArgumentResolver