Beispiel #1
0
def __resolve_struct(value, kwval_as):
    """
    Take a string representing a structure and safely serialize it with the
    specified medium
    """
    if kwval_as == "yaml":
        return _yaml_load(value, _YamlCustomLoader)
    elif kwval_as == "json":
        return json.loads(value)
    elif kwval_as is None or kwval_as == "verbatim":
        return value
Beispiel #2
0
def __resolve_struct(value, kwval_as):
    '''
    Take a string representing a structure and safely serialize it with the
    specified medium
    '''
    if kwval_as == 'yaml':
        return  _yaml_load(value, _YamlCustomLoader)
    elif kwval_as == 'json':
        return json.loads(value)
    elif kwval_as is None or kwval_as == 'verbatim':
        return value
Beispiel #3
0
 def parse_kwval(value):
     return _yaml_load(value, _YamlCustomLoader)
Beispiel #4
0
 def parse_kwval(value):
     return _yaml_load(value, _YamlCustomLoader)