# Path: openformats/formats/yaml/constants.py
# YAML_DICT_ID = u'tag:yaml.org,2002:map'
# 
# YAML_LIST_ID = u'tag:yaml.org,2002:seq'
# 
# YAML_STRING_ID = u'tag:yaml.org,2002:str'


import six
import yaml
from openformats.formats.yaml.constants import (YAML_DICT_ID, YAML_LIST_ID,
                                                YAML_STRING_ID)
# -*- coding: utf-8 -*-
from __future__ import absolute_import




"""
YAML representers
"""


def unicode_representer(dumper, data):
    tag = getattr(data, 'tag', YAML_STRING_ID)
    return yaml.ScalarNode(tag=tag, value=data)


def folded_unicode_representer(dumper, data):
    return dumper.represent_scalar(YAML_STRING_ID, data, style='>')


def literal_unicode_representer(dumper, data):
    return dumper.represent_scalar(YAML_STRING_ID, data, style='|')


def double_quoted_unicode_representer(dumper, data):

# Path: openformats/formats/yaml/constants.py
# YAML_DICT_ID = u'tag:yaml.org,2002:map'
# 
# YAML_LIST_ID = u'tag:yaml.org,2002:seq'
# 
# YAML_STRING_ID = u'tag:yaml.org,2002:str'


# Path: openformats/formats/yaml/yaml_representers.py
import six
import yaml
from openformats.formats.yaml.constants import (YAML_DICT_ID, YAML_LIST_ID,
                                                YAML_STRING_ID)

# -*- coding: utf-8 -*-
from __future__ import absolute_import




"""
YAML representers
"""


def unicode_representer(dumper, data):
    tag = getattr(data, 'tag', YAML_STRING_ID)
    return yaml.ScalarNode(tag=tag, value=data)


def folded_unicode_representer(dumper, data):
    return dumper.represent_scalar(YAML_STRING_ID, data, style='>')


def literal_unicode_representer(dumper, data):
    return dumper.represent_scalar(YAML_STRING_ID, data, style='|')


def double_quoted_unicode_representer(dumper, data):

    tag = getattr(data, 'tag', YAML_STRING_ID)