Ahmad Bassam Bkerat
Ahmad Bassam Bkerat

Reputation: 105

Convert Json to x-www-form-urlencoded by Postman

I need to know how to Convert The list of object (SERVICES) to x-www-form-urlencoded by Postman

My Json Inputs :

 {
    "BILLING_NUMBER": "554128536954",
    "EVENT_KEY": " BUNDLE",
    "PROCCESS_DATE": "",
    "LANGUAGE": "EN",
    "VERSION": "1",
    "SERVICES": [
                 {
                   "SERVICE_CODE": "ODB_12345"
                 },
                 {
                   "SERVICE_CODE": "ODB_123445"
                 }
              ]
  }

Upvotes: 5

Views: 16558

Answers (2)

Ellie
Ellie

Reputation: 11

I know it’s a bit stupid, but I did it this way.If the json string is simple style,not nesting,you can convert ',' to '\n' remove all '"' and '{' and'}', then filter all space if needed,In Body->x-www-form-urlencoded->Bulk Edit input it, it will be the right format to read. for example,

 {
    "BILLING_NUMBER": "554128536954",
    "EVENT_KEY": " BUNDLE",
    "PROCCESS_DATE": "",
    "LANGUAGE": "EN",
    "VERSION": "1",
}

to

BILLING_NUMBER:554128536954
EVENT_KEY:BUNDLE
PROCCESS_DATE:
LANGUAGE:EN
VERSION:1

Upvotes: 1

Ahmad Bassam Bkerat
Ahmad Bassam Bkerat

Reputation: 105

I found the solution as below:

BILLING_NUMBER:554128536954
EVENT_KEY:BUNDLE
PROCCESS_DATE:
LANGUAGE:EN
VERSION:1
SERVICES[0].SERVICE_CODE:ODB_12345
SERVICES[1].SERVICE_CODE:ODB_123445

Upvotes: 4

Related Questions