Skip to content

Invalid json with line breaks in array repeat expander #165

@Linkinou

Description

@Linkinou

Hey,
Not sure if it's a bug or I'm doing something wrong.

Given this json and using the JsonMatcher :

    {
        "id": "@number@",
        "name": "@string@",
        "entries": "@array@.repeat({
            \"id\": \"@number@\",
            \"question\": \"@string@\",
            \"answer\": \"@string@\",
            \"os\": \"@*@\"
        })"
    }

I got this error :
Invalid given JSON of pattern. Unexpected control character found (Exception)

But with this given json, it works :

    {
        "id": "@number@",
        "name": "@string@",
        "entries": "@array@.repeat({\"id\": \"@number@\", \"question\": \"@string@\", \"answer\": \"@string@\", \"os\": \"@*@\"})"
    }

The only thing I've changed is putting the array.repeat content on the same line.

Is that an expected behavior ?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions