deal with JSON request bodies