I use an API, and feed a DB table based on the expected parameters coming in through that API.
However, the API frequently changes, so I have a “catch-all” TEXT column called unexpectedParameters in MySQL for any unexpected items coming from the API (e.g. a new item name and value pair introduced in an update of the API), so that I don’t lose them.
How should I store these unexpected key => value pairs so that in the future, if necessary, I can quickly pull the unexpectedParameters column and parse it to re-populate the updated table with the newly-introduced columns for those new parameters?
Well, if I were facing that problem this second, I’d use a text field populated with JSON. That maintains the key => value connections, takes up little space, and is easily parsable.