Not unique at all. I do it all the time.
Return the Map as the response in JSON format.
If your server code is in
Java, there are any number of JSON libraries (Gson, Jackson, Stringtree, etc) that will convert a Map to its JSON equivalent with one line of code.