You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by "Rodrigo Gallardo (JIRA)" <ji...@apache.org> on 2008/10/17 11:54:44 UTC

[jira] Created: (SHINDIG-656) Implement List decoding in BeanJsonConverter

Implement List decoding in BeanJsonConverter
--------------------------------------------

                 Key: SHINDIG-656
                 URL: https://issues.apache.org/jira/browse/SHINDIG-656
             Project: Shindig
          Issue Type: Improvement
          Components: Common Components (Java)
            Reporter: Rodrigo Gallardo
            Priority: Minor
         Attachments: decode-json-array.patch

Included patch implements requesting a json string to be decoded as a list. It assumes the string represents a json array, I simply could not find any reasonable way to handle a different case.

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


[jira] Commented: (SHINDIG-656) Implement List decoding in BeanJsonConverter

Posted by "Ian Boston (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-656?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12640498#action_12640498 ] 

Ian Boston commented on SHINDIG-656:
------------------------------------

Although fixing this is probably correct. I have 2 questions before I commit.

If lists were not handled, how was the SocialAPI working at all for JSON ?

I cant remember which part of the social api needed a list as a base container, it must be there somewhere... what I missing ?


Also,

The Existing JSON Bean appears to have a number of shortcomings that the community is providing patches for, is it time to switch to the net.sf json lib version, that I think does all of this already ?

> Implement List decoding in BeanJsonConverter
> --------------------------------------------
>
>                 Key: SHINDIG-656
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-656
>             Project: Shindig
>          Issue Type: Improvement
>          Components: RESTful API (Java)
>            Reporter: Rodrigo Gallardo
>            Assignee: Ian Boston
>            Priority: Minor
>         Attachments: decode-json-array.patch
>
>
> Included patch implements requesting a json string to be decoded as a list. It assumes the string represents a json array, I simply could not find any reasonable way to handle a different case.

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


[jira] Updated: (SHINDIG-656) Implement List decoding in BeanJsonConverter

Posted by "Rodrigo Gallardo (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHINDIG-656?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rodrigo Gallardo updated SHINDIG-656:
-------------------------------------

    Attachment: decode-json-array.patch

Decode json array as List

> Implement List decoding in BeanJsonConverter
> --------------------------------------------
>
>                 Key: SHINDIG-656
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-656
>             Project: Shindig
>          Issue Type: Improvement
>          Components: Common Components (Java)
>            Reporter: Rodrigo Gallardo
>            Priority: Minor
>         Attachments: decode-json-array.patch
>
>
> Included patch implements requesting a json string to be decoded as a list. It assumes the string represents a json array, I simply could not find any reasonable way to handle a different case.

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


[jira] Updated: (SHINDIG-656) Implement List decoding in BeanJsonConverter

Posted by "Ian Boston (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHINDIG-656?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ian Boston updated SHINDIG-656:
-------------------------------

    Component/s:     (was: Common Components (Java))
                 RESTful API (Java)
       Assignee: Ian Boston

This is part of the restfull api, not a common component.

> Implement List decoding in BeanJsonConverter
> --------------------------------------------
>
>                 Key: SHINDIG-656
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-656
>             Project: Shindig
>          Issue Type: Improvement
>          Components: RESTful API (Java)
>            Reporter: Rodrigo Gallardo
>            Assignee: Ian Boston
>            Priority: Minor
>         Attachments: decode-json-array.patch
>
>
> Included patch implements requesting a json string to be decoded as a list. It assumes the string represents a json array, I simply could not find any reasonable way to handle a different case.

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


[jira] Commented: (SHINDIG-656) Implement List decoding in BeanJsonConverter

Posted by "Rodrigo Gallardo (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-656?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12640507#action_12640507 ] 

Rodrigo Gallardo commented on SHINDIG-656:
------------------------------------------

> If lists were not handled, how was the SocialAPI working at all for JSON ?

Well, it was serializing OK, deserialization was the missing part.

AFAICT, deserializing json arrays is only used by shindig when reading a batch json rpc request, and in that case the code explicitly tests for the string being a "[ ... something ... ]" and does not call the BeanEncoder at all. I only came across this because I tried to use the BeanEncoder to (de)serialize my SPI objects to store them in memcached.

> Implement List decoding in BeanJsonConverter
> --------------------------------------------
>
>                 Key: SHINDIG-656
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-656
>             Project: Shindig
>          Issue Type: Improvement
>          Components: RESTful API (Java)
>            Reporter: Rodrigo Gallardo
>            Assignee: Ian Boston
>            Priority: Minor
>         Attachments: decode-json-array.patch
>
>
> Included patch implements requesting a json string to be decoded as a list. It assumes the string represents a json array, I simply could not find any reasonable way to handle a different case.

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


[jira] Closed: (SHINDIG-656) Implement List decoding in BeanJsonConverter

Posted by "Ian Boston (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHINDIG-656?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ian Boston closed SHINDIG-656.
------------------------------

    Resolution: Fixed

Patch applied thank you.

> Implement List decoding in BeanJsonConverter
> --------------------------------------------
>
>                 Key: SHINDIG-656
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-656
>             Project: Shindig
>          Issue Type: Improvement
>          Components: RESTful API (Java)
>            Reporter: Rodrigo Gallardo
>            Assignee: Ian Boston
>            Priority: Minor
>         Attachments: decode-json-array.patch
>
>
> Included patch implements requesting a json string to be decoded as a list. It assumes the string represents a json array, I simply could not find any reasonable way to handle a different case.

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