kolypto / j2cli

Jinja2 Command-Line Tool, reworked

Home Page:http://pypi.python.org/pypi/j2cli

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

character is changed, when converting

ozbillwang opened this issue · comments

When converting, why it changed the value false to False? (capital letter)

# cat a.j2
{
  "key": {
    "enabled": {{ app.enabled }}
}

# cat a.json
{
  "app": {
    "enabled": false
  }
}

# j2 a.j2 a.json
{
  "key": {
    "enabled": False
}
commented

This is Python behavior: it's boolean literal has a capital F.

Use Jinja2 |lower filter: {{ bool_variable|str|lower }}