How to deal with a situation when I need to change config file structure?
For example, let's say I want to change it from this
{
"device_address": "127.0.0.1:5001"
}
to this
{
"device": {
"ip": "127.0.0.1",
"port": 5001
}
}
If I'll do so, the new program release will fail to read it, which will cause the configuration will be lost, which is bad :(
But I can't stack with the same config structure forever - project is changing, requirements are changing...
Does anyone know any best practices for this issue?