You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by "Yonik Seeley (JIRA)" <ji...@apache.org> on 2006/07/17 01:24:13 UTC

[jira] Created: (SOLR-31) JSON response writer

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


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

        

[jira] Updated: (SOLR-31) JSON response writer

Posted by "Anonymous (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/SOLR-31?page=all ]


    Attachment: example.txt

> 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: example.txt, 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

        

[jira] Updated: (SOLR-31) JSON response writer

Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/SOLR-31?page=all ]

Yonik Seeley updated SOLR-31:
-----------------------------

    Attachment: json.diff

> 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

        

[jira] Commented: (SOLR-31) JSON response writer

Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/SOLR-31?page=comments#action_12421482 ] 
            
Yonik Seeley commented on SOLR-31:
----------------------------------

Date Types: there are no native date types in Ruby or Python to my knowledge (that need no import), so they are currently represented as a string.  A future option could allow dates to be written differently, such as the number of milliseconds since the UNIX epoch... that might make it much easier to construct native date objects.

> 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

        

[jira] Commented: (SOLR-31) JSON response writer

Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
    [ 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

        

[jira] Resolved: (SOLR-31) JSON response writer

Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/SOLR-31?page=all ]

Yonik Seeley resolved SOLR-31.
------------------------------

    Resolution: Fixed

fixed returnedField list handling, including score field, committed.

> 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: example.txt, 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