Save - Load runtime variables to/from JSON

Hi everyone,

I’m looking for good ideas, experiences or “best practices” for the folling idea:

Storing variables from runtime to a JSON file, to reload them, in case the run crashes. jMy goal is, to give the automation the activities to look for these files and read them, so it can skip partial sequences, because results from these sequences where stored inside that files.

I already played around with json string, but in the loss of time, I never found myself a “best practice” way to do so. Especially, when it comes to build file contentn with more then one object level, it became quiet unhandy.

@J0ska I read your comment to this topic. Mayby you could share some of your experioences?

I hope, I expained that in an understandable way :smiley:

I like real basic activities to make stuff light weight and simple. So, all ideas are welcome.

Have a fantastic day!

Regards,
Christian

1 Like

There are many options

  • JSON Templates and then Value populations
  • JSON Processing with the Newtonsoft package

But for your case it is also recommended to have broader look at the UiPath Oecosystem / Architecture in general as for example such part result handling also can be realized in combination with the Data Service / Data Fabric.

I have sent you also a PM

I usually use the second option mentioned by @ppr - Newtonsoft package

But in my case the JSON structure is rather flat, no need of any complex hierarchies.

I saw that in later Studio versions it is possible to create own complex data structures. It might be easier method, but I did not expore it yet - still using last LTS version.

Cheers

1 Like