As stated in the documentation it is possible to write the declarative configuration in both yaml as in json:
Kong 1.1 added the capability to run Kong without a database, using only in-memory storage for entities: we call this DB-less mode . When running Kong DB-less, the configuration of entities is done in a second configuration file, in YAML or JSON, using declarative configuration .
However, when I’m using json, Kong seems to expect yaml format (mentioning invalid character at line 1). Do I need to ‘tell’ Kong to use JSON format instead of yaml somehow?
I’m running KONG in Docker using:
KONG_DECLARATIVE_CONFIG=/usr/local/kong/declarative/kong.json
This is working fine when the same file is in yaml format.