<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def json_decode(data):
 """ Decodes the given JSON as primitives """

    if isinstance(data, six.binary_type):
        data = data.decode('utf-8')

    return json.loads(data)