Parses the given string as either JSON or YAML. If null is passed in,
null will be returned. If the passed in string can neither be decoded
via JSON nor YAML an exception will be thrown.
Parses the given string as either JSON or YAML. If null is passed in,
null will be returned. If the passed in string can neither be decoded
via JSON nor YAML an event will be logged and null will be returned.