Is it possible to use .json file like data file with the UFL interface or does I need to use the UFL connector ?
You can, but the interface has no concept of a key/value pairs, so it would treat it just like any other flat file. Your parsing logic might become pretty complicated depending on the structure of the object. If you have the possibility to use the Connector, it would definitely be preferable. We have a number of examples on parsing json objects on github and pisquare.
The problem is also that the structure is not the same all the time, I can have 20 parameters with values in one moment and have 60 parameters with values in a second time...
Right, you can still make it work with the interface - we use to do it a lot before the connector, but its complicated and requires many many conditional loops. Using the connector makes it much easier.
Unless you are reading from a serial port or using the POP3/IMAP plugin, there is hardly any reason to use the interface over the connector (even then, there are good workarounds).
Retrieving data ...