Can I pass nested Json as a external file in postman collection runner or newman cli?

I am creating a collection runner in postman where i want to pass the body of a request as a property in external variable. i want to pass nested json. However , i am getting error while adding thefile.
is it not allowed to pass nested json as a external file in postman?

my input would kind of like this:
{
“servicename” : “ABCd”,

“body” : {
“property1” : “value1”,
“property2” : “value2”,
“property3” : “value3”,
“property4” : “value4”

}
}

However, flat file is working fine. please let me know any way i can do that?

thanks in advance

Can you share some screenshots with what worked and what didn’t?

@vdespa i am sending two external json file.

{

“comment1_userDefault”: “Business data for user default validation”,
“purchasingOrganization” : “0001”,
“companyCode” : “0001”,

“comment1_catalogDefault”: “Business data for catalog default validation”,

“perticularCatalogAssgin” : “acbd”,
“defaultCatalogFlag” : true,
“correctUrl” : “https://abcdefgh.com”,
“username” : “#######”,
“password” : “#######”

}

This above one worked.

{

“defaults”:{
“purchasingOrganization” : “0001”,
“companyCode” : "0001
},
“serviceData” :
{
“perticularCatalogAssgin” : “acbd”,
“defaultCatalogFlag” : true,
“correctUrl” : “https://abcdefgh.com”,
“username” : “#######”,
“password” : “#######”
}

}

The above one was not.

Thanks
Swastik

Which error did you get with the second one?

Hi @vdespa I am really sorry for late reply. The Error comes as a unsupported format type. I request you to create a normal nested json file and in collection runner give it as a input data file. you might encounter the error.

Please let me know whether is it not supported or nor. If it supported then what is the way to do this. Thanks in advance

~Swastik