codeconsole commented on code in PR #16411:
URL: https://github.com/apache/grails-core/pull/16411#discussion_r4123871849


##########
grails-converters/src/main/groovy/grails/converters/JSON.java:
##########
@@ -546,7 +547,8 @@ protected Object createNode(Object key, Map valueMap) {
                 writer.object();
                 for (Object o : valueMap.entrySet()) {
                     Map.Entry element = (Map.Entry) o;
-                    writer.key(String.valueOf(element.getKey())); 
//.value(element.getValue());
+                    Object elementKey = element.getKey();
+                    writer.key(elementKey == null ? "null" : 
JsonDateFormat.formatKey(elementKey));

Review Comment:
   Both paths behave as in 7.x: the builder wrote `String.valueOf(key)`, which 
gives `"null"`, and `MapMarshaller` skipped the entry. This PR only changes how 
date keys are written.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to