2 Replies Latest reply on May 23, 2015 3:32 AM by eljenso

    RESTEasy-JSAPI provides JSON as String since WildFly 8.2.0

    eljenso

      Hello,

       

      we are currently using WildFly 8.1.0 and are testing migration to 8.2.0. We're also using RESTEasy and the provided Javascript API, which is really handy.

       

      After changing to 8.2.0 we noticed that on every API call where we would normally get a JSON-Object we now get a simple JSON-String. Since RESTEasy sends JSON-Strings the problem should be somewhere within the generated Javascript API.

      We did some searching and found the function which causes this issue: https://github.com/resteasy/Resteasy/blob/master/jaxrs/resteasy-jsapi/src/main/resources/resteasy-client.js#L286

       

      Somewhere between RESTEasy 3.0.8 and 3.0.10 the Content-Type header field of the server response was altered, from application/json to application/json;charset=utf-8.

      Because of this change the function linked above always returns false and a JSON-String is never parsed into a JSON-Object.

       

      I would be happy to file an issue on Jira and make a pull request on GitHub.