dcb9/curl2httpie

[bug] Nested json is not parsed correctly

sralloza opened this issue · 0 comments

The httpie command http :8080/xxx out_1[in_1]=value_1 out_2[in_2]=value_2 out_3=value_3 sends the following payload:

{
    "out_1": {
        "in_1": "value_1"
    },
    "out_2": {
        "in_2": "value_2"
    },
    "out_3": "value_3"
}

But the online tool creates the following curl command:

curl --header 'Content-Type: application/json' --data '{"out_1[in_1]":"value_1","out_2[in_2]":"value_2","out_3":"value_3"}' localhost:8080/xxx

Which sends the payload {"asId[ipv4addr]":"1.1.1.1","qos":"QOS_E","ueId[msisdn]":"+34666777888"}