[ 
https://issues.apache.org/jira/browse/SOLR-885?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12651743#action_12651743
 ] 

Yonik Seeley commented on SOLR-885:
-----------------------------------

bq. I do not see any difference between NamedList and SimpleOrderedMap . Both 
has same semantics.

See the javadoc for SimpleOrderedMap:

{code}
/** <code>SimpleOrderedMap</code> is a [EMAIL PROTECTED] NamedList} where 
access by key is more
 * important than maintaining order when it comes to representing the
 * held data in other forms, as ResponseWriters normally do.
 * It's normally not a good idea to repeat keys or use null keys, but this
 * is not enforced.  If key uniqueness enforcement is desired, use a regular 
[EMAIL PROTECTED] Map}.
 * <p>
 * For example, a JSON response writer may choose to write a SimpleOrderedMap
 * as {"foo":10,"bar":20} and may choose to write a NamedList as
 * ["foo",10,"bar",20].  An XML response writer may choose to render both
 * the same way.
 * </p>
{code}

The problem is that some clients don't maintain order (for example, doing 
eval() of JSON/python/ruby output).  It wouldn't be an issue if we had control 
over all clients, but we don't.

> Generify NamedListCodec
> -----------------------
>
>                 Key: SOLR-885
>                 URL: https://issues.apache.org/jira/browse/SOLR-885
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Noble Paul
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: SOLR-885.patch
>
>
> * make NamedListCodec a generic class which may be able to write any of the 
> supported object
> * Deprecate NamedList and use only SimpleOrderedMap. (Yes it is backward 
> compatible)
> * Ideally I wish to call this JavabinCodec because it should be able to be 
> used to write any kind of supported objects

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to