[
http://issues.apache.org/jira/browse/SOLR-31?page=comments#action_12421481 ]
Yonik Seeley commented on SOLR-31:
----------------------------------
Some implementation notes:
- There is a base class for all text-oriented writers, TextResponseWriter...
it is meant to be generic enough to allow things like JSON or XML output (hence
the name parameter for primitives like writeInt() even though the name is
unused in the primitive methods for JSON).
- The FieldType hierarchy gains a new method:
public void write(TextResponseWriter writer, String name, Fieldable f)
- I left the existing XML writer methods on FieldType alone for now... a
future patch could easily implement the XMLWriter in terms of
TextResponseWriter and deprecate the existing FieldType.write(XMLWriter...)
methods.
- the style of output for NamedList (a single map, or an array or 2 element
arrays) is selectable via the parameter "json.nl"... current values are "map",
"arrmap", "arrarr"
> JSON response writer
> --------------------
>
> Key: SOLR-31
> URL: http://issues.apache.org/jira/browse/SOLR-31
> Project: Solr
> Issue Type: New Feature
> Components: search
> Reporter: Yonik Seeley
> Assigned To: Yonik Seeley
> Attachments: json.diff
>
>
> Here is the JSON response writer, along with subclasses for Python and Ruby.
> Python: use None for null, True/False for boolean, use unicode strings where
> necessary
> Ruby: use single quoted strings to avoid security issues, use => as map
> separator
> Patch and examples to follow, comments sought.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira