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

David Johnson edited comment on USERGRID-429 at 2/27/15 4:06 PM:
-----------------------------------------------------------------

Some background:

Our class-path includes both Jackson 1.9.9 and 2.3.3.

Our end-points return Jackson 2.3.3 JSON objects and we expect Jersey to do the 
right thing.

We configure Jackson via a @Provider class JacksonCustomMapperProvider, but 
that provider class is not being called. That means that our JSON will include 
null fields, no formatting, etc.

If I change things so that the provide is being called then every response from 
Usergrid is JSONP format and that breaks all REST tests. I think this is 
because our @Provider returns a Jackson 2 ObjectMapper.

The root problem seems to be that the Jackson 2 ObjectMapper does not know how 
to deal with the Jackson 1 JSONPWithPadding object and it simply serializes the 
object, and the result is we always get JSONP format.








was (Author: djohnson):
Some background:

Our class-path includes both Jackson 1.9.9 and 2.3.3.

Our end-points return Jackson 2.3.3 JSON objects and we expect Jersey to do the 
right thing.

We configure Jackson via a @Provider class JacksonCustomMapperProvider, but 
that provider class is not being called. That means that our JSON will include 
null fields, no formatting, etc.

If I change things so that the provide is being called then every response from 
Usergrid is JSONP format and that breaks all REST tests. I think this is 
because our @Provider returns a Jackson 2 object mapper.

The root problem seems to be that we are using Jackson 2, but our REST API 
returns a Jackson 1 object called JSONWithPadding and that object is serialized 
as is, causing the JSONP formatting.







> two-dot-o Entity returned in improper format
> --------------------------------------------
>
>                 Key: USERGRID-429
>                 URL: https://issues.apache.org/jira/browse/USERGRID-429
>             Project: Usergrid
>          Issue Type: Bug
>          Components: Stack
>            Reporter: David Johnson
>         Attachments: jsonprettyprint_com_json-pretty-printer_php 2.png, 
> jsonprettyprint_com_json-pretty-printer_php.png
>
>
> In the two-dot-o branch entities are returned with some additional fields 
> "properties" and "dynamicProperties" that are not supposed to be there. Check 
> out the two attached screenshots. The one with the redundant info is the 
> two-dot-o one.



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

Reply via email to