Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"MISSING" text is appended in the middle of my json response #63

Closed
badoet opened this issue Sep 2, 2014 · 3 comments
Closed

"MISSING" text is appended in the middle of my json response #63

badoet opened this issue Sep 2, 2014 · 3 comments

Comments

@badoet
Copy link

badoet commented Sep 2, 2014

getting something like this on my json response :
"Description":"Firing more than 1 weapon in a turn will increase all damage by 5 / 10 / 15 / 20%!"(MISSING)

it only appears on goji, tried to query the json request using another golang framework, it works fine for them.
is there some issue with goji?

@elithrar
Copy link
Contributor

elithrar commented Sep 2, 2014

There's nothing that Goji does which would cause that.

Can you post the code that generates the response? "MISSING" is indication
of a missing format string (i.e. from fmt.Sprintf).

On Tuesday, September 2, 2014, badoet notifications@github.com wrote:

getting something like this on my json response :
"Description":"Firing more than 1 weapon in a turn will increase all
damage by 5 / 10 / 15 / 20%!"(MISSING)

it only appears on goji, tried to query the json request using another
golang framework, it works fine for them.
is there some issue with goji?


Reply to this email directly or view it on GitHub
#63.

@badoet
Copy link
Author

badoet commented Sep 2, 2014

Thanks for the clue .
was using the fmt.Fprintf to return the json .
changing to fmt.Fprint solve it.

@badoet badoet closed this as completed Sep 2, 2014
@elithrar
Copy link
Contributor

elithrar commented Sep 2, 2014

As a tip, you should probably use w.Write (where w is http.ResponseWriter) to write the JSON bytes out directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants