corwinus
New member
- Joined
- Jun 4, 2022
- Messages
- 2
- Programming Experience
- Beginner
I have many json files with the same type data Examples:
I successfully merged and deserialized (used Newtonsoft.Json) data from all jsons to 2 files:
After some changes in Values.txt I need to serialize/save it to json files (they have to be the same as source jsons – only values are changed).
So finally I need Files1.json and Files2.json with only values changed.
I am able to serialize to one json but have no idea how do it with many jsons.
File1.json:
{
"$id": "1",
"strings": [
{
"Key": "some unique key1",
"Value": ”some value1”
},
{
"Key": "some unique key2",
"Value": ”some value2”
},
]
}
File2.json:
{
"$id": "1",
"strings": [
{
"Key": "some unique key3",
"Value": ”some value3”
},
{
"Key": "some unique key4",
"Value": ”some value4”
},
]
}
I successfully merged and deserialized (used Newtonsoft.Json) data from all jsons to 2 files:
Keys.csv (content below, without header) Line_number;key;value;json_file_name:
1; "some unique key1”; ”some value1”;”File1.json”
2; "some unique key2”; ”some value2”;”File1.json”
3; "some unique key3”; ”some value3”;”File2.json”
4; "some unique key4”; ”some value4”;”File2.json”
Values.txt :
”<1>some value1”
”<2>some value2”
”<3>some value3”
”<4>some value4”
After some changes in Values.txt I need to serialize/save it to json files (they have to be the same as source jsons – only values are changed).
So finally I need Files1.json and Files2.json with only values changed.
I am able to serialize to one json but have no idea how do it with many jsons.