@mxf-dev/core 2.0.3 → 2.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -834,6 +834,14 @@ export class AutoCorrectionService {
834
834
  private convertType(value: any, targetType: 'string' | 'number' | 'boolean' | 'object'): any {
835
835
  switch (targetType) {
836
836
  case 'string':
837
+ // Objects and arrays are stringified as JSON so the corrected
838
+ // value stays faithful to what the model sent — String() would
839
+ // collapse an object to "[object Object]", and the "successful"
840
+ // correction would silently destroy the payload without the
841
+ // model ever seeing an error it could learn from.
842
+ if (typeof value === 'object' && value !== null) {
843
+ return JSON.stringify(value);
844
+ }
837
845
  return String(value);
838
846
  case 'number':
839
847
  const num = Number(value);