cxf-issues mailing list archives

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


Sergey Beryozkin commented on CXF-6166:

Hi Daniel,
Re your first example, you;d first work with a map and then do a toJson(Map) call.
Re the second one, this parser has not been meant, originally at least to act as a generic
parser, it was used internally by the Jose code in the context where a class like JwtClaims
would know the context (example, a given claim is an Integer or Date) and would conver the
String accordingly but then I thought I'd make it more open and public because it can be useful
even without Jose.
The auto-conversion into Integer/etc without the type info or the implicit knowledge of the
type info is not easy to do right as the experience with Jettison shows. I think I can add
one more method, fromJson(String json, boolean autoConvert), if autoConvert is true then the
parser will try the best effort and convert into Integer or Long or even Date

> Parsing Bug in org.apache.cxf.jaxrs.provider.json.JsonMapObjectReaderWriter
> ---------------------------------------------------------------------------
>                 Key: CXF-6166
>                 URL:
>             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

View raw message