readContent#

pyCGM2.Utils.files.readContent(stringContent: str)#

Read a string content in JSON or YAML format and return it as a dictionary.

Parameters:

stringContent (str) – The string content in JSON or YAML format.

Returns:

dict – The parsed content.

Raises:

Exception – If the content is neither JSON nor YAML.