Skip to content

Inja can't render json objects due to wrong quotation marks #271

Open
@hwiedPro

Description

@hwiedPro

Given the following template:

{ "some_key": {{ A_JSON_OBJECT_VARIABLE }} }

The variable A_JSON_OBJECT_VARIABLE is defined as follows:

nl::json variables = nl::json{
  {"A_JSON_OBJECT_VARIABLE",
    {
      {"key1", "value1"}, {"key2", "value2"}
    }
  }
}

When now rendering with inja this is the result:

{ "some_key": "{"key1":"value1","key2":"value2"}" }

However we expected something like this:

{ "some_key": {"key1":"value1","key2":"value2"} }

PS: Indexing the inner keys works

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions