<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def encode_params(params, **kwargs):
 """Clean and JSON-encode a dict of parameters."""

    cleaned = clean_params(params, **kwargs)
    return json.dumps(cleaned)