Skip to content

JSON template preview doesn't unpack values #627

@LucasPickering

Description

@LucasPickering

Unpacked JSON values are not templated correctly. Take this body as an example:

body:
  type: json
  data:
    {
      "age": "{{ prompt(message='Age', default=3) | integer() }}",
      "weight_kg": "{{ prompt(message='Weight (kg)', default='1.5') | float() }}",
    }

The age field should be unpacked to an integer. That happens correctly in request that's actually sent:

{"age":3,"weight_kg":1.5}

But here's what you see in the preview pane before sending:

{
  "age": "3",
  "weight_kg": "1.5"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions