[ https://issues.apache.org/jira/browse/CXF-6166?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14253285#comment-14253285 ]
Sergey Beryozkin edited comment on CXF-6166 at 12/19/14 11:15 AM: ------------------------------------------------------------------ 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 convert 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 was (Author: sergey_beryozkin): 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: 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)