• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python serialization.s_unicode函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: _s_thumbnail_url

def _s_thumbnail_url(stream, thumbnail):
    s_bool(stream, thumbnail is not None)
    if thumbnail:
        s_unicode(stream, thumbnail.url)
        s_long(stream, thumbnail.height)
        s_long(stream, thumbnail.width)
开发者ID:our-city-app,项目名称:mobicage-backend,代码行数:6,代码来源:messaging.py


示例17: _serialize_advanced_order_category

def _serialize_advanced_order_category(stream, c):
    s_long(stream, 1)  # version
    s_unicode(stream, c.id)
    s_unicode(stream, c.name)
    _serialize_advanced_order_item_list(stream, c.items)
开发者ID:rogerthat-platform,项目名称:rogerthat-backend,代码行数:5,代码来源:forms.py


示例18: _serialize_message_embedded_app

def _serialize_message_embedded_app(stream, obj):
    # type: (StringIO.StringIO, MessageEmbeddedApp) -> None
    s_long(stream, 1)  # version
    s_unicode(stream, obj.context)
    s_unicode(stream, obj.description)
    s_unicode(stream, obj.id)
    s_unicode(stream, obj.image_url)
    s_unicode(stream, obj.result)
    s_unicode(stream, obj.title)
开发者ID:our-city-app,项目名称:mobicage-backend,代码行数:9,代码来源:messaging.py


示例19: _serialize_news_item

def _serialize_news_item(stream, news_item):
    version = 7
    s_long(stream, version)
    s_bool(stream, news_item.sticky)
    s_long(stream, news_item.sticky_until)
    _serialize_news_sender(stream, news_item.sender)
    s_unicode_list(stream, news_item.app_ids)
    s_long(stream, news_item.timestamp)
    s_unicode(stream, news_item.title)
    s_unicode(stream, news_item.message)
    s_unicode(stream, news_item.image_url)
    s_long(stream, news_item.type)
    s_unicode(stream, news_item.broadcast_type)
    s_long(stream, news_item.reach)
    s_bool(stream, news_item.rogered)
    s_unicode_list(stream, news_item.users_that_rogered)
    _serialize_news_buttons(stream, news_item.buttons)
    s_long(stream, news_item.id)
    s_unicode(stream, news_item.qr_code_content)
    s_unicode(stream, news_item.qr_code_caption)
    s_long(stream, news_item.version)  # this is different from the version above
    s_long(stream, news_item.flags)
    s_long(stream, news_item.scheduled_at)
    s_bool(stream, news_item.published)
    s_long(stream, news_item.action_count)
    s_long(stream, news_item.follow_count)
    _serialize_news_target_audience(stream, news_item.target_audience, version)
    s_long_list(stream, news_item.role_ids)
    s_unicode_list(stream, news_item.tags)
开发者ID:rogerthat-platform,项目名称:rogerthat-backend,代码行数:29,代码来源:news.py


示例20: serialize_advanced_order

def serialize_advanced_order(stream, w):
    s_long(stream, 1)  # version
    s_unicode(stream, w.currency)
    s_long(stream, w.leap_time)
    _serialize_advanced_order_category_list(stream, w.categories)
开发者ID:rogerthat-platform,项目名称:rogerthat-backend,代码行数:5,代码来源:forms.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python mclevel.fromFile函数代码示例发布时间:2022-05-27
下一篇:
Python serialization.s_long函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap