0
votes

I am creating a configuration properties file in JSON. But I am unable to read it in the flow. How can I read a JSON properties file in Mule 4.

sample properties file- config.json:

{
    "currency" : {"USA": "Dollar","India":"Rupee"},
    "table" : {"accountID": "Account"}
}

If its a .yaml file we use ${} expression to access. But how to access .json properties file in the flow?

Thanks in advance

1

1 Answers

3
votes

Mule 4 doesn't support JSON properties files. It supports . properties or YAML: https://docs.mulesoft.com/mule-runtime/4.3/configuring-properties#supported_files

You can create you own custom properties reader that supports JSON in Java: https://docs.mulesoft.com/mule-runtime/4.3/configuring-properties#custom-properties-provider