artillery
artillery copied to clipboard
JSON Payload interpreted incorrectly when using post
I've noticed that the JSON payload gets deformed, especially when there is a dot in a JSON key.
Version info: ^2.0.12
I expected this JSON payload to be sent:
{
"title":"Customer Operations Agent",
"body":"Product",
"userId":1,
"metadata":{
"eperson.firstname":[
{
"value":"Raul"
}
],
"eperson.lastname":[
{
"value":"Pfannerstill"
}
]
}
}
When I called my post with the below json payload
- post:
url: '/posts'
json:
title: '{{title}}'
body: '{{body}}'
userId: '{{userId}}'
metadata:
"eperson.firstname":
- value: '{{firstName}}'
"eperson.lastname":
- value: '{{lastName}}'
However, the keys "eperson.firstname" and "eperson.lastname" were interpreted incorrectly and thus transformed to the below
{
"title":"Customer Operations Agent",
"body":"Product",
"userId":1,
"metadata":{
"eperson.firstname":[
{
"value":"Raul"
}
],
"eperson.lastname":[
{
"value":"Pfannerstill"
}
],
"eperson":{
"firstname":[
{
"value":"Raul"
}
],
"lastname":[
{
"value":"Pfannerstill"
}
]
}
}
}