当前位置: 首页>>代码示例>>Python>>正文


Python serialization.s_unicode函数代码示例

本文整理汇总了Python中mcfw.serialization.s_unicode函数的典型用法代码示例。如果您正苦于以下问题:Python s_unicode函数的具体用法?Python s_unicode怎么用?Python s_unicode使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了s_unicode函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: serialize_form_result

def serialize_form_result(stream, fr):
    s_long(stream, 1)  # version
    if fr:
        s_unicode(stream, fr.type)
        WIDGET_RESULT_MAPPING[fr.type].model_serialize(stream, fr.result)
    else:
        s_unicode(stream, "")
开发者ID:rogerthat-platform,项目名称:rogerthat-backend,代码行数:7,代码来源:forms.py

示例2: serialize_sign

def serialize_sign(stream, w):
    s_long(stream, 4)  # version
    s_unicode(stream, w.payload)
    s_unicode(stream, w.caption)
    s_unicode(stream, w.algorithm)
    s_unicode(stream, w.key_name)
    s_unicode(stream, w.index)
开发者ID:rogerthat-platform,项目名称:rogerthat-backend,代码行数:7,代码来源:forms.py

示例3: _serialize_base_payment_method

def _serialize_base_payment_method(stream, c):
    # type: (object, BasePaymentMethod) -> None
    s_long(stream, 2)  # version
    s_bool(stream, c is not None)
    if c:
        s_unicode(stream, c.currency)
        s_long(stream, c.amount)
        s_long(stream, c.precision)
开发者ID:our-city-app,项目名称:mobicage-backend,代码行数:8,代码来源:forms.py

示例4: _serialize_member_status

def _serialize_member_status(stream, r):
    s_long(stream, r.status)
    s_long(stream, r.received_timestamp)
    s_long(stream, r.acked_timestamp)
    s_long(stream, r.index)
    s_bool(stream, r.dismissed)
    s_long(stream, r.button_index)
    s_unicode(stream, r.custom_reply)
    serialize_form_result(stream, r.form_result)
    s_unicode(stream, r.ack_device)
开发者ID:rogerthat-platform,项目名称:rogerthat-backend,代码行数:10,代码来源:messaging.py

示例5: _serialize_friend_detail

def _serialize_friend_detail(stream, fd):
    s_unicode(stream, fd.email)
    s_unicode(stream, fd.name)
    s_long(stream, fd.avatarId)
    s_bool(stream, fd.shareLocation)
    s_bool(stream, fd.sharesLocation)
    s_bool(stream, fd.sharesContacts)
    s_long(stream, fd.type)
    s_bool(stream, fd.hasUserData)
    s_long(stream, fd.relationVersion)
开发者ID:gitter-badger,项目名称:rogerthat-backend,代码行数:10,代码来源:friend.py

示例6: serialize_date_select

def serialize_date_select(stream, w):
    s_long(stream, 1)  # version
    s_bool(stream, w.has_date)
    s_bool(stream, w.has_max_date)
    s_bool(stream, w.has_min_date)
    s_long(stream, w.date)
    s_long(stream, w.max_date)
    s_long(stream, w.min_date)
    s_long(stream, w.minute_interval)
    s_unicode(stream, w.mode)
    s_unicode(stream, w.unit)
开发者ID:rogerthat-platform,项目名称:rogerthat-backend,代码行数:11,代码来源:forms.py

示例7: _serialize_button

def _serialize_button(stream, b):
    s_unicode(stream, b.id)
    s_long(stream, b.index)
    s_unicode(stream, b.caption)
    s_unicode(stream, b.action)
    s_long(stream, b.ui_flags)
    s_unicode(stream, b.color)
开发者ID:rogerthat-platform,项目名称:rogerthat-backend,代码行数:7,代码来源:messaging.py

示例8: _serialize_attachment

def _serialize_attachment(stream, a):
    s_long(stream, a.index)
    s_unicode(stream, a.content_type)
    s_unicode(stream, a.download_url)
    s_long(stream, a.size)
    s_unicode(stream, a.name)
    _s_thumbnail_url(stream, a.thumbnail)
开发者ID:our-city-app,项目名称:mobicage-backend,代码行数:7,代码来源:messaging.py

示例9: serialize_mydigipass_widget_result

def serialize_mydigipass_widget_result(stream, result):
    s_long(stream, 2)  # version
    if result.eid_profile is None:
        s_bool(stream, False)
    else:
        s_bool(stream, True)
        serialize_mydigipass_eid_profile(stream, result.eid_profile)

    if result.eid_address is None:
        s_bool(stream, False)
    else:
        s_bool(stream, True)
        serialize_mydigipass_eid_address(stream, result.eid_address)

    s_unicode(stream, result.eid_photo)
    s_unicode(stream, result.email)
    s_unicode(stream, result.phone)

    if result.profile is None:
        s_bool(stream, False)
    else:
        s_bool(stream, True)
        serialize_mydigipass_profile(stream, result.profile)

    if result.address is None:
        s_bool(stream, False)
    else:
        s_bool(stream, True)
        serialize_mydigipass_address(stream, result.address)
开发者ID:rogerthat-platform,项目名称:rogerthat-backend,代码行数:29,代码来源:forms.py

示例10: serialize_pay

def serialize_pay(stream, w):
    s_long(stream, 2)
    _serialize_payment_method_list(stream, w.methods)
    s_unicode(stream, w.memo)
    s_unicode(stream, w.target)
    s_bool(stream, w.auto_submit)
    s_bool(stream, w.test_mode)
    s_unicode(stream, w.embedded_app_id)
开发者ID:rogerthat-platform,项目名称:rogerthat-backend,代码行数:8,代码来源:forms.py

示例11: _serialize_payment_method

def _serialize_payment_method(stream, c):
    s_long(stream, 2)  # version
    s_unicode(stream, c.provider_id)
    s_unicode(stream, c.currency)
    s_long(stream, c.amount)
    s_long(stream, c.precision)
    s_bool(stream, c.calculate_amount)
    s_unicode(stream, c.target)
开发者ID:our-city-app,项目名称:mobicage-backend,代码行数:8,代码来源:forms.py

示例12: _serialize_news_statistic_per_app

def _serialize_news_statistic_per_app(stream, value):
    s_long(stream, 1)  # version
    s_long(stream, len(value))
    for app_id, stats in value.iteritems():
        s_unicode(stream, app_id)
        _serialize_news_item_statistics(stream, stats)
开发者ID:rogerthat-platform,项目名称:rogerthat-backend,代码行数:6,代码来源:news.py

示例13: _serialize_news_sender

def _serialize_news_sender(stream, sender):
    s_long(stream, 1)  # version
    s_unicode(stream, sender.email)
    s_unicode(stream, sender.name)
    s_long(stream, sender.avatar_id)
开发者ID:our-city-app,项目名称:mobicage-backend,代码行数:5,代码来源:news.py

示例14: _serialize_mobile_detail

def _serialize_mobile_detail(stream, md):
    s_unicode(stream, md.account)
    s_long(stream, md.type_)
    s_unicode(stream, md.pushId)
    s_unicode(stream, md.app_id)
开发者ID:our-city-app,项目名称:mobicage-backend,代码行数:5,代码来源:profiles.py

示例15: serialize_public_key

def serialize_public_key(stream, pk):
    s_unicode(stream, pk.algorithm)
    s_unicode(stream, pk.name)
    s_unicode(stream, pk.index)
    s_unicode(stream, pk.public_key)
开发者ID:our-city-app,项目名称:mobicage-backend,代码行数:5,代码来源:profiles.py


注:本文中的mcfw.serialization.s_unicode函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。