You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Chaitanya Choleti (JIRA)" <ji...@apache.org> on 2010/07/28 08:44:18 UTC

[jira] Created: (CXF-2916) unmarshalling the JSON of a subclass fails when a field value is null

unmarshalling the JSON of a subclass fails when a field value is null
---------------------------------------------------------------------

                 Key: CXF-2916
                 URL: https://issues.apache.org/jira/browse/CXF-2916
             Project: CXF
          Issue Type: Bug
          Components: JAX-RS
    Affects Versions: 2.2.9
         Environment: Windows XP,  JDK 1.6.0_14
            Reporter: Chaitanya Choleti


Unmarshalling the JSON :

{"@xsi.type" : "subClassTest", "id" : "10000000", "name" : null }

should give an instance of SubClassTest.class and the value of the field name(which is a String) should be null, but with the current implementation the value of the field name is String "null" .

This happens only in the case of unmarshalling JSON to a subclass.

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


[jira] Issue Comment Edited: (CXF-2916) unmarshalling the JSON of a subclass fails when a field value is null

Posted by "Andrew Nelson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2916?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12894818#action_12894818 ] 

Andrew Nelson edited comment on CXF-2916 at 8/3/10 12:58 AM:
-------------------------------------------------------------

This issue seems to be caused by http://jira.codehaus.org/browse/JETTISON-89 .  

The attached file (CXF-2916.patch) should be applied the cxf trunk.
The attached file (CXF-2916-jettison.patch) should be applied to the jettison trunk.
 

      was (Author: drewbob):
    This issue seems to be caused by http://jira.codehaus.org/browse/JETTISON-89 .  

The attached file (CXF-2916.path) should be applied the cxf trunk.
The attached file (CXF-2916-jettison.patch) should be applied to the jettison trunk.

 
  
> unmarshalling the JSON of a subclass fails when a field value is null
> ---------------------------------------------------------------------
>
>                 Key: CXF-2916
>                 URL: https://issues.apache.org/jira/browse/CXF-2916
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>    Affects Versions: 2.2.9
>         Environment: Windows XP,  JDK 1.6.0_14
>            Reporter: Chaitanya Choleti
>         Attachments: CXF-2916-jettison.patch, CXF-2916.patch
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> Unmarshalling the JSON :
> {"@xsi.type" : "subClassTest", "id" : "10000000", "name" : null }
> should give an instance of SubClassTest.class and the value of the field name(which is a String) should be null, but with the current implementation the value of the field name is String "null" .
> This happens only in the case of unmarshalling JSON to a subclass.

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


[jira] Updated: (CXF-2916) unmarshalling the JSON of a subclass fails when a field value is null

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

Andrew Nelson updated CXF-2916:
-------------------------------

    Attachment: CXF-2916.patch
                CXF-2916-jettison.patch

This issue seems to be caused by http://jira.codehaus.org/browse/JETTISON-89 .  

The attached file (CXF-2916.path) should be applied the cxf trunk.
The attached file (CXF-2916-jettison.patch) should be applied to the jettison trunk.

 

> unmarshalling the JSON of a subclass fails when a field value is null
> ---------------------------------------------------------------------
>
>                 Key: CXF-2916
>                 URL: https://issues.apache.org/jira/browse/CXF-2916
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>    Affects Versions: 2.2.9
>         Environment: Windows XP,  JDK 1.6.0_14
>            Reporter: Chaitanya Choleti
>         Attachments: CXF-2916-jettison.patch, CXF-2916.patch
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> Unmarshalling the JSON :
> {"@xsi.type" : "subClassTest", "id" : "10000000", "name" : null }
> should give an instance of SubClassTest.class and the value of the field name(which is a String) should be null, but with the current implementation the value of the field name is String "null" .
> This happens only in the case of unmarshalling JSON to a subclass.

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


[jira] Issue Comment Edited: (CXF-2916) unmarshalling the JSON of a subclass fails when a field value is null

Posted by "Andrew Nelson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2916?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12895320#action_12895320 ] 

Andrew Nelson edited comment on CXF-2916 at 8/4/10 12:57 PM:
-------------------------------------------------------------

As requested the patch + test cases has been attached to http://jira.codehaus.org/browse/JETTISON-89 .

      was (Author: drewbob):
    As requested the patch + test cases have been attached to http://jira.codehaus.org/browse/JETTISON-89 .
  
> unmarshalling the JSON of a subclass fails when a field value is null
> ---------------------------------------------------------------------
>
>                 Key: CXF-2916
>                 URL: https://issues.apache.org/jira/browse/CXF-2916
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>    Affects Versions: 2.2.9
>         Environment: Windows XP,  JDK 1.6.0_14
>            Reporter: Chaitanya Choleti
>         Attachments: CXF-2916-jettison.patch, CXF-2916.patch
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> Unmarshalling the JSON :
> {"@xsi.type" : "subClassTest", "id" : "10000000", "name" : null }
> should give an instance of SubClassTest.class and the value of the field name(which is a String) should be null, but with the current implementation the value of the field name is String "null" .
> This happens only in the case of unmarshalling JSON to a subclass.

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


[jira] Commented: (CXF-2916) unmarshalling the JSON of a subclass fails when a field value is null

Posted by "Andrew Nelson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2916?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12895320#action_12895320 ] 

Andrew Nelson commented on CXF-2916:
------------------------------------

As requested the patch + test cases have been attached to http://jira.codehaus.org/browse/JETTISON-89 .

> unmarshalling the JSON of a subclass fails when a field value is null
> ---------------------------------------------------------------------
>
>                 Key: CXF-2916
>                 URL: https://issues.apache.org/jira/browse/CXF-2916
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>    Affects Versions: 2.2.9
>         Environment: Windows XP,  JDK 1.6.0_14
>            Reporter: Chaitanya Choleti
>         Attachments: CXF-2916-jettison.patch, CXF-2916.patch
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> Unmarshalling the JSON :
> {"@xsi.type" : "subClassTest", "id" : "10000000", "name" : null }
> should give an instance of SubClassTest.class and the value of the field name(which is a String) should be null, but with the current implementation the value of the field name is String "null" .
> This happens only in the case of unmarshalling JSON to a subclass.

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


[jira] Commented: (CXF-2916) unmarshalling the JSON of a subclass fails when a field value is null

Posted by "Sergey Beryozkin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2916?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12895172#action_12895172 ] 

Sergey Beryozkin commented on CXF-2916:
---------------------------------------

Hi Andrew 

Can you please attach CXF-2916-jettison.patch to http://jira.codehaus.org/browse/JETTISON-89, if possible with a simple
Jettison test ? This will make if feasible to start talking about say Jettison 1.2.1. We can't really depend on 1.3-SNAPSHOT, this would be a major release, with some major fixed/enhancements and it is unlikely to happen in the short term. 1.2.1 is more realistic.

In meantime, the only thing you can do in CXF is to register a custom provider extending JSONProvider and override createReader(). Delegate to the superclass first and then wrap the returned reader in your own. Then somehow deal with "null" sequences...

> unmarshalling the JSON of a subclass fails when a field value is null
> ---------------------------------------------------------------------
>
>                 Key: CXF-2916
>                 URL: https://issues.apache.org/jira/browse/CXF-2916
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>    Affects Versions: 2.2.9
>         Environment: Windows XP,  JDK 1.6.0_14
>            Reporter: Chaitanya Choleti
>         Attachments: CXF-2916-jettison.patch, CXF-2916.patch
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> Unmarshalling the JSON :
> {"@xsi.type" : "subClassTest", "id" : "10000000", "name" : null }
> should give an instance of SubClassTest.class and the value of the field name(which is a String) should be null, but with the current implementation the value of the field name is String "null" .
> This happens only in the case of unmarshalling JSON to a subclass.

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