activities
latest
false
重要 :
请注意,此内容已使用机器翻译进行了部分本地化。 新发布内容的本地化可能需要 1-2 周的时间才能完成。
UiPath logo, featuring letters U and I in white

开发者活动

上次更新日期 2025年9月29日

Serialize JSON

UiPath.WebAPI.Activities.JSON.SerializeJson

描述

Serializes the given Object to a JSON string, optionally based on the customer serializer settings.

项目兼容性

Windows | 跨平台

Windows、跨平台配置

  • Input object - The object to be serialized to a JSON string.
高级选项
输入
  • Serializer settings - Customer serializer settings to be used when serializing the object. Use this property when you want to fully control how the provided object gets serialized.
重要提示:
  • Make sure you are using the latest Studio version (2025.0.161 or higher). Studio versions previous to 2025.0.161 use the Expression Editor window instead of the data mapping functionality.
  • When no data mapping is available for the Serialized settings property, you can use use the following code snippets. For more information, see Newtonsoft documentation.

    Vb.net:

    New JsonSerializationSettings With {
    	.Formatting = JsonFormatting.Indented,
    	.NullValueHandling = JsonNullValueHandling.Ignore,
    	.DefaultValueHandling = JsonDefaultValueHandling.Ignore,
    	.DateFormatHandling = JsonDateFormatHandling.IsoDateFormat,
    	.DateFormatString = "yyyy-MM-dd HH"
    }New JsonSerializationSettings With {
    	.Formatting = JsonFormatting.Indented,
    	.NullValueHandling = JsonNullValueHandling.Ignore,
    	.DefaultValueHandling = JsonDefaultValueHandling.Ignore,
    	.DateFormatHandling = JsonDateFormatHandling.IsoDateFormat,
    	.DateFormatString = "yyyy-MM-dd HH"
    }
    C#:
    new JsonSerializationSettings 
    {
    	Formatting = JsonFormatting.Indented,
    	NullValueHandling = JsonNullValueHandling.Ignore,
    	DefaultValueHandling = JsonDefaultValueHandling.Ignore,
    	DateFormatHandling = JsonDateFormatHandling.IsoDateFormat,
    	DateFormatString = "yyyy-MM-dd HH"
    }new JsonSerializationSettings 
    {
    	Formatting = JsonFormatting.Indented,
    	NullValueHandling = JsonNullValueHandling.Ignore,
    	DefaultValueHandling = JsonDefaultValueHandling.Ignore,
    	DateFormatHandling = JsonDateFormatHandling.IsoDateFormat,
    	DateFormatString = "yyyy-MM-dd HH"
    }
输出
  • JSON object - The serialized JSON string.
  • 描述
  • 项目兼容性
  • Windows、跨平台配置

此页面有帮助吗?

获取您需要的帮助
了解 RPA - 自动化课程
UiPath Community 论坛
Uipath Logo
信任与安全
© 2005-2025 UiPath。保留所有权利。