readjson#

readjson(string, **kwargs)[source]#

Read JSON from a string

Alias to json.loads().

Parameters:
  • string (str) – a string representation of the JSON

  • kwargs (dict) – passed to json.loads()

See also sc.loadjson() for loading a JSON from a file.

Example:

string = '{"this":1, "is":2, "a":3, "JSON":4}'
json = sc.readjson(string)

New in version 3.0.0.