from Base.Class.Json import *
from Base.Class.Yaml import *


def auto_decode(data):
    try:
        try:
            return json_decode(data)
        except:
            return yaml_decode(data)
    except:
        raise Exception('非Json或Yaml数据格式 | String in not a Json or Yaml format.')
