I have a set of files (file1.. fileN), they all have the same structure, but this structure can be different each time (json, xml, text... is undefined, but it is always the same type of information) I need to do a change in all of them so if I add a field in an xml it must be in all of them. The same when I add a new line in a plain text. I've thinking to use git for this purpose, I could do the change in one of the files and then merge this file in the other ones.
File1:
{name: "Harry",
lastname: "Potter"}
change:
{name: "Harry",
lastname: "Potter",
age: 12}
file2:
{name: "Hermion",
lastname: "Granger"}
file2 after bing processed:
{name: "Hermion",
lastname: "Granger",
age: 12}
I know you can use a json parser to do it but since the information can be plain text or another different kind of information it is not valid in this case, I need a way to do the changes when the structure is the same not based in the information encoding.
Is it possible? How can I do it?