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 Thu, 18 Dec 2014 22:32:13 GMT

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

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

Hi Sergey, 

this is right, if you have a JSON Object that begins with ' { 'and ends with ' } ', but if
you want to add an entry (no JSON Object) that will not work correctly.
{code:borderStyle=solid}
JsonMapObjectReaderWriter jmo = new JsonMapObjectReaderWriter();
Map<String, ?> data = jmo.fromJson(new String("\"test\":24,\"test2\":\"value\"".getBytes()));
System.out.println(data.get("test"));
System.out.println(data.get("test2"));
{code}

I see that my patch is not quite right. JSON Object will not be processed correctly.
Perhaps it would make sense to make verification, it is a JSON Object or is JSON Entry, what
would you think?

> 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