swagger-client 3.27.0 → 3.27.1

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.
@@ -1854,6 +1854,13 @@ function formatKeyValueBySerializationOption(key, value, skipEncoding, serializa
1854
1854
  const escape = skipEncoding ? false : serializationOption && serializationOption.allowReserved ? 'unsafe' : 'reserved';
1855
1855
  const encodeFn = v => (0,_execute_oas3_style_serializer_js__WEBPACK_IMPORTED_MODULE_2__.valueEncoder)(v, escape);
1856
1856
  const encodeKeyFn = skipEncoding ? k => k : k => encodeFn(k);
1857
+ if (typeof value === 'string') {
1858
+ try {
1859
+ value = JSON.parse(value);
1860
+ } catch {
1861
+ // can't parse the value so treat it as as a simple string
1862
+ }
1863
+ }
1857
1864
 
1858
1865
  // Primitive
1859
1866
  if (typeof value !== 'object') {