serhiy-bzhezytskyy commented on code in PR #4761:
URL: https://github.com/apache/solr/pull/4761#discussion_r3841016377
##########
solr/core/src/java/org/apache/solr/jersey/SolrJacksonMapper.java:
##########
@@ -70,7 +70,8 @@ public NamedListSerializer(Class<NamedList> nlClazz) {
@Override
public void serialize(NamedList value, JsonGenerator gen,
SerializerProvider provider)
throws IOException {
- gen.writeObject(value.asShallowMap());
+ // Not SimpleOrderedMap: it IS a NamedList, so this serializer would
recurse on it.
+ gen.writeObject(value.asMap(0));
Review Comment:
Implemented it: registered a second, more specific serializer for
SimpleOrderedMap that writes it directly via entrySet(), no copy, no recursion
(verified with a standalone Jackson probe before touching this code). Nested
plain NamedLists still fall through to the existing asMap(0) path.
Added SolrJacksonMapperTest.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]