Add a generic function to send a SQL request as JSON
Avoid duplicates in the JSON