发布新帖

查找

摘要
· 二月 16
摘要
· 二月 16
公告
· 二月 16

Developer Community Maintenance Notice (Feb 21-22)

Hi Developers!

Please note that the Developer Community will undergo scheduled maintenance on February 21–22, 2026.

During this period, the site will be unavailable for several hours. Depending on your location, you may experience temporary downtime at different times within this window.

This maintenance is required as we are migrating to a new version of the underlying framework. While most of the interface and functionality will remain the same, you may notice that some elements look or behave slightly differently after the update.

Following the maintenance, some temporary instability may occur as services fully come back online.

If you notice any issues, we’d really appreciate your feedback - please report them here.

Thank you for your patience and understanding!

1 条新评论
讨论 (1)2
登录或注册以继续
问题
· 二月 16

%JSON.Adaptor don't clear "list of" property

Hi,

I'm having a problem with %JSON.Adaptor and "list of" binding.

For exemple, this class with a property "oazisCode As list of %String".

Class User.ADGroup Extends (%Persistent, %JSON.Adaptor)

{
/// Code interne
Property code As %String;

/// Libellé
Property text As %String(MAXLEN = "");

Property oazisCode As list Of %String;

}

The first time call to %JSONImport works properly

s r = ##class(User.ADGroup).%New()
s json = {"code": "123", "text":"456", "oazisCode": ["1","2"]}
d r.%JSONImport(json)
w r.oazisCode.Size
2

If I call %JSONIMport a second time with another json , the "oazisCode" property is not cleared and new values are added to the list

s json = {"code": "123", "text":"456", "oazisCode": ["4","5"]}
d r.%JSONImport(json)
w r.oazisCode.Size
4

If I try to clear the property by passing an empty array, it does nothing

s json = {"code": "123", "text":"456", "oazisCode": []}
d r.%JSONImport(json)
w r.oazisCode.Size
4

It seems to be a problem with "GenerateImportInternal" from %JSON.Generator class wich never call "Clear" method of Collection properties.

Is there a workaround or something to do to clear a "list of" property ?

Regards

5 条新评论
讨论 (5)2
登录或注册以继续
公告
· 二月 16

Avis de maintenance pour la communauté des développeurs (21-22 février)

Salut les développeurs !

Veuillez noter que la Communauté des développeurs sera soumise à une maintenance programmée les 21 et 22 février 2026.

Durant cette période, le site sera indisponible pendant plusieurs heures. Selon votre localisation, vous pourriez subir des interruptions temporaires à différents moments.

Cette maintenance est nécessaire car nous migrons vers une nouvelle version de notre infrastructure. Bien que la plupart de l'interface et des fonctionnalités restent inchangées, vous remarquerez peut-être que certains éléments ont une apparence ou un comportement légèrement différents après la mise à jour.

Après la maintenance, une légère instabilité peut survenir le temps que les services soient de nouveau pleinement opérationnels.

Si vous rencontrez des problèmes, n'hésitez pas à nous en faire part ici.

Merci de votre patience et de votre compréhension !

讨论 (0)1
登录或注册以继续