do not want to tie to SQL as the structure might be coming from apps or users that are not aware of SQL.
also the user would need to know what type of RDBMS is deployed which is too much sometimes (the app holding the REST would do the discovery solely).
thank you for the link.
I send JSON data to databases (Firebird and PostgreSQL) behind a remote REST server that I built using Lazarus. The REST server uses SQLdb to convert the data into SQL parameters for predefined INSERT, UPDATE, DELETE statements. I then call SQLDb's ExecSQL to post the data into the databases.
That is the beauty of having an application server. It does the work and the user/client app does not need to know anything about how the data is processed by the server.
If you don't like that method, you can send JSON data directly to a stored procedure in the database. The stored procedure will parse the JSON data and update the database accordingly.
Another option, if you are using PostgreSQL or MariaDB, is to use their JSON functionalities to parse the sent data and update the database.
Cheers,
JD