Xml/json Config file

Hi I would like to know more on the possibility of using Xml/json file as config file. As of now I am following the traditional config.xlsx file.

If anyone have a sample of xml/json config file along with a sample automation using it will be much helpful for me

Thanks in advance!

1 Like

Hope this would help you
JSON as Config

Cheers @amithvs

1 Like

Thanks @Palaniyappan for the response. I will have a look at it.

1 Like

Sure, kindly let know for any queries or clarification

@amithvs

do you have the json file which is used as a configuration file in any automation?
for eg: a json file having username and password. I need to get the values from the json into code.

I am testing with this sample json file to get the values.New Text Document.json (603 Bytes)

1 Like

yah its the same way how we deserialize the json or xml file
once after deserializing we can get the value from that JSON file and use that as a input
if you have multiple value then loop through deserailized JSON and get each value
We have an example on how to deserialize json
Deserialize Json

Cheers @amithvs

Thanks. I will work on it. thanks a lot.

  1. Anything that should be kept in mind when we deploy this in production?
  2. How can we secure it?
  3. How can someone start designing a json file for a project from scratch?
  4. Does this need to lear basic json designing?

Fine lets get to one by one

  1. Anything that should be kept in mind when we deploy this in production?
    This is the same way we use excel as config and we are just trying to replace the config file type from excel to json

  2. How can we secure it?
    Keep this within the project folder so that only the user who has access to the project folder or to the orchestrator can see the file

  3. How can someone start designing a json file for a project from scratch?
    its simple, refer to PROJECT.JSON file which will get generated for each UiPath project. We can even refer that as a sample on how it is formed, like simple JSON file or JSON Array object

  4. Does this need to learn basic json designing?
    Yah it would be obviously great to know the basics of JSON formatting.

Cheers @amithvs

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.