Hi Rezar Dalipaj,
and welcome to the OpenEMS Community. I was able to identify the problem and will fix it in this PR, that is going to be included in the next release 2024.8.0:
I am hardly ever using Metadata.File myself, but when looking through this rather old code, I had the idea to refactor it.
For your use-case do you require an external JSON file or would it also work for you if you could edit this JSON via Apache Felix Web Console? (Internally this config is then also written in a file, but it would make certain tasks much easier and faster if it was refactored)
Regards,
Stefan