ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antonenko Alexander (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (AMBARI-5902) Views: View managed resources need @Produces({"text/plain"}) to generate JSON
Date Tue, 27 May 2014 18:12:02 GMT

     [ https://issues.apache.org/jira/browse/AMBARI-5902?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Antonenko Alexander updated AMBARI-5902:
----------------------------------------

    Description: 
For managed resource GET calls I wanted JSON response. 
{code}
{
 "a": "b"
}
{code}

Keeping {code}@Produces({"application/json"}){code}  on the @GET method gives a string-serialized
output of the JSON
{code}
"{\"a\":\"b\"}"
{code}

However when I keep {code}@Produces({"text/plain", "application/json"}){code} correctly produces
JSON.

{strong}Temporary UI Fix: Set Accept header to "text/plain" for some requests.{strong}

  was:
For managed resource GET calls I wanted JSON response. 
{code}
{
 "a": "b"
}
{code}

Keeping {code}@Produces({"application/json"}){code}  on the @GET method gives a string-serialized
output of the JSON
{code}
"{\"a\":\"b\"}"
{code}

However when I keep {code}@Produces({"text/plain", "application/json"}){code} correctly produces
JSON.

{b}Temporary UI Fix: Set Accept header to "text/plain" for some requests.{b}


> Views: View managed resources need @Produces({"text/plain"}) to generate JSON
> -----------------------------------------------------------------------------
>
>                 Key: AMBARI-5902
>                 URL: https://issues.apache.org/jira/browse/AMBARI-5902
>             Project: Ambari
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 1.6.1
>            Reporter: Antonenko Alexander
>            Assignee: Antonenko Alexander
>             Fix For: 1.6.1
>
>
> For managed resource GET calls I wanted JSON response. 
> {code}
> {
>  "a": "b"
> }
> {code}
> Keeping {code}@Produces({"application/json"}){code}  on the @GET method gives a string-serialized
output of the JSON
> {code}
> "{\"a\":\"b\"}"
> {code}
> However when I keep {code}@Produces({"text/plain", "application/json"}){code} correctly
produces JSON.
> {strong}Temporary UI Fix: Set Accept header to "text/plain" for some requests.{strong}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message