Consider also accepting a string in JSON format instead of one having to `JSON.parse(theJsonString)` beforehand.