From a865ef85f011aeebb956e58800f86096b21a56b5 Mon Sep 17 00:00:00 2001 From: iroqueta Date: Thu, 9 May 2024 15:46:52 -0300 Subject: [PATCH] Json with DateTime field deserialize with empty value if the DateTime vale have one or two digits in milliseconds section. Issue: 106837 --- .../src/main/java/com/genexus/xml/GXXMLSerializable.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/common/src/main/java/com/genexus/xml/GXXMLSerializable.java b/common/src/main/java/com/genexus/xml/GXXMLSerializable.java index 61ed47f93..5a8f29603 100644 --- a/common/src/main/java/com/genexus/xml/GXXMLSerializable.java +++ b/common/src/main/java/com/genexus/xml/GXXMLSerializable.java @@ -15,6 +15,8 @@ import com.genexus.internet.IGxJSONAble; import com.genexus.internet.IGxJSONSerializable; +import static com.genexus.common.interfaces.SpecificImplementation.GXutil; + public abstract class GXXMLSerializable implements Cloneable, Serializable, IGxJSONAble, IGxJSONSerializable { @@ -425,7 +427,11 @@ private Object convertValueToParmType(Object value, Class parmClass) throws Exce { if (value.toString().equals("null")) return null; - return localUtil.ctot(value.toString(), 0); + String stringValue = value.toString(); + if (stringValue.contains(".")) + return GXutil.charToTimeREST(stringValue); + else + return localUtil.ctot(stringValue, 0); } return CommonUtil.convertObjectTo(value, parmClass); }