curlconverter / curlconverter

Transpile curl commands into Python, JavaScript and 27 other languages
https://curlconverter.com
MIT License
7.17k stars 867 forks source link

For curl to json conversion, the xml type data seems to be coming in key value pairs #618

Closed eknathyadav closed 4 months ago

eknathyadav commented 4 months ago

For curl to JSON conversion, the XML-type data seems to be coming in key-value pairs. Instead, it should have come in a single-string format like other converters give. Screenshot from 2024-01-05 02-20-18 Screenshot from 2024-01-05 02-27-58

By the way, great library. Impressive.

verhovsky commented 4 months ago

maybe we need to add a "raw_data": key so that you can distinguish

curl example.com --json '"some string"'

and

curl example.com --json 'some string'

which are both converted to "data": "some string" since the first one is a JSON string and the latter is invalid JSON.

eknathyadav commented 4 months ago

hi @verhovsky

can you please tell me how much time will it take to get these changes reflected in the npm package? When do you plan to release these changes?

verhovsky commented 4 months ago

@eknathyadav 4.9.0 was published to npm just now with the change.