activities
latest
false
- Vue d'ensemble (Overview)
- Cryptographie
- Base de donnés
- Java
- Python
- APIweb
Important :
Veuillez noter que ce contenu a été localisé en partie à l’aide de la traduction automatique.
La localisation du contenu nouvellement publié peut prendre 1 à 2 semaines avant d’être disponible.
Activités du développeur.
UiPath.WebAPI.Activities.JSON.SerializeJson
Description
Sérialise l’objet donné en chaîne JSON, éventuellement en se basant sur les paramètres de sérialisation personnalisés.
Compatibilité du projet
Windows | Multiplate-forme
Prérequis
To configure the Serializer settings property using data mapping, use Studio 25.10 or later. In earlier Studio versions, this property uses the Expression Editor window instead.
Windows, configuration multiplate-forme
- Objet d’entrée : l’objet à sérialiser en chaîne JSON.
Options avancées
Entrée
- Paramètres de sérialisation : paramètres personnalisés de sérialisation à utiliser lors de la sérialisation de l’objet. Utilisez cette propriété lorsque vous souhaitez contrôler entièrement la façon dont l'objet fourni est sérialisé.
Sortie
- Objet JSON : La chaîne JSON sérialisée.
Example of using Serializer settings
When no data mapping is available for the Serializer settings property, configure it in the Expression Editor using one of the following code snippets. For more information, see the 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"
}