Function: json.decode

Decodes given JSON bytes (assuming UTF-8), or a string, into an object.

If the input is bytes, it is first converted to a string, as if by calling text.decode(data, 'UTF-8').

Arguments

Arguments
data

bytes|string

The input to be decoded.

Returns

The decoded object.

Raised exceptions

Exceptions
ValueError If given data is not a valid JSON object.