cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Torkian (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CXF-6166) Parsing Bug in org.apache.cxf.jaxrs.provider.json.JsonMapObjectReaderWriter
Date Fri, 19 Dec 2014 08:09:13 GMT

    [ https://issues.apache.org/jira/browse/CXF-6166?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14253130#comment-14253130
] 

Daniel Torkian commented on CXF-6166:
-------------------------------------

Hi again,
please look at the following code snippets:
{code:java}
JsonMapObjectReaderWriter jmo = new JsonMapObjectReaderWriter();
Map<String, Object> data = jmo.fromJson(new String("{\"integer\":24,\"nullKey\":null}".getBytes()));
System.out.println(jmo.toJson(data));
{code}

the following is the output in the console:
{code}
{"integer":"24","nullKey":"null"}
{code}

Integer and null are converted to string. 
The correct output should be:
{code}
{"integer":24,"nullKey":null}
{code}

> Parsing Bug in org.apache.cxf.jaxrs.provider.json.JsonMapObjectReaderWriter
> ---------------------------------------------------------------------------
>
>                 Key: CXF-6166
>                 URL: https://issues.apache.org/jira/browse/CXF-6166
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>    Affects Versions: 3.0.3, 3.0.4, 3.1.0
>            Reporter: Daniel Torkian
>            Priority: Minor
>              Labels: JAXRS, JSON, Parsing
>         Attachments: bugJsonMapObjectReaderWriter.txt
>
>
> Parsing Bug in org.apache.cxf.jaxrs.provider.json.JsonMapObjectReaderWriter.
> See Patch



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message