refactored parse and validate to read json doc from body