# ask-the-community

George D. Torres

10/26/2022, 4:39 PM
Does any one have any tips for Unmarshaling responses from flyte admin (in Go)? For example when I send a GET to
with a execution id, the json response I get can't be Unmarshaled to the proper struct (located here). I'm especially having a hard time Unmarshaling `core.Literal`s

Samhita Alla

10/27/2022, 4:20 AM
cc: @Yee @Kevin Su

Eduardo Apolinario (eapolinario)

10/27/2022, 5:04 PM
@George D. Torres, can you share some of the code you're using? Also, can you paste a stacktrace of the error you're seeing?

George D. Torres

10/27/2022, 5:09 PM
@Eduardo Apolinario (eapolinario) thank you! I'm afk today, but I'll put that here tomorrow
@Eduardo Apolinario (eapolinario) I am taking my GET response from
(the raw json for that response is attached). Then I Unmarshal that into an
(which appears to be the correct output model according to the swagger docs) using the following code:
Copy code
data := admin.WorkflowExecutionGetDataResponse{}
err := json.Unmarshal(data_json, &data) // data_json is the raw response from flyte      

if err != nil {
        c.Data(status, "application/json", data_json) // return raw json
c.JSON(status, data) // return unmarshalled object as json
It does successfully Unmarshal, but the resulting unmarshaled object
in all of the places the literals should be (see unmarshalled json attachment).


11/10/2022, 7:29 PM
hey @George D. Torres for json unmarshalling you'll want to use jsonpb, like we do here:
(it's frustrating because the json unmarshalling will happily not return an err even when it fails to populate the message 😞)

George D. Torres

11/10/2022, 7:31 PM
Appreciated! I'll give that a shot