FLAT
Ctrlk
CouperSevenval TechnologiesDocker ImageGithub
  • Changelog
  • FLAT
  • Administration
  • Cookbook
  • Reference
    • Configuration
    • Debugging
    • flat CLI
    • Flow
    • Variables
    • OpenAPI / Swagger Integration
    • OpenAPI
    • OpenAPI
    • OpenAPI
    • OpenAPI
    • OpenAPI
    • OpenAPI
    • OpenAPI
    • Flow Actions
    • Functions
    • Templating
      • {{,}}
      • Comment {{// …}}
      • Dot {{.}}
      • Conditional `{{if <condition>}} … {{elseif <condition> }} … {{else}} … {{end}}
      • loop
      • ?? Operator
      • Object XML Notation (OXN)
      • Pair Producer {{: …}}
      • Placeholder
      • Template Variables
      • with
    • Testing
  • Tutorial
Powered by GitBook
On this page
  • Comment {{// <comment>}}
  • Placeholder {{ <expression> }}
  • Dot {{.}}
  • Comma {{,}}
  • Pair Producer {{: <expression> }}
  • Variable Definition {{$<name> := <expression> }}
  • Conditional {{if <condition>}} … {{elseif <condition> }} … {{else}} … {{end}}
  • Loop {{loop <array>}} … {{end}}
  • Context Switch {{with <expression>}} … {{else}} … {{end}}
  • Null Coalescing Operator ??

Was this helpful?

  1. Reference

Templating

FLAT's template language is intended to dynamically generate JSON documents.

Basically, you provide the skeleton of the JSON object you want to create, and use placeholders instead of literal values. The language supports template commands that are documented below. Template expressions and functions offer rich means of accessing request and response data in JSON, HTML or XML (OXN).

Comment {{// <comment>}}

Placeholder {{ <expression> }}

Dot {{.}}

Comma {{,}}

Pair Producer {{: <expression> }}

Variable Definition {{$<name> := <expression> }}

Conditional {{if <condition>}} … {{elseif <condition> }} … {{else}} … {{end}}

Loop {{loop <array>}} … {{end}}

Context Switch {{with <expression>}} … {{else}} … {{end}}

Null Coalescing Operator ??

Previousxml-to-json()Next{{,}}

Last updated 6 years ago

Was this helpful?