api/v0/users: split out common User JSON parsing and validation logic into method, for re-use