default_barcode_type, true); if (json_last_error() === JSON_ERROR_NONE) { if (is_array($data)) { $data['default_barcode_type'] = $defaultBarcodeTypes; } else { $data->default_barcode_type = $defaultBarcodeTypes; } } return $data; } }