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

Deserializando lista parametrizada com GsonDeserialization #584

Merged
merged 3 commits into from
Nov 20, 2013

Conversation

cacio-costa
Copy link
Contributor

Adicionada ao GsonDeserialization a capacidade de deserializar uma coleção parametrizada ao GsonDeserialization.

@cacio-costa
Copy link
Contributor Author

logger.debug("json with no content");
return params;
}

logger.debug("json retrieved: {}", content);
logger.info("json retrieved: {}", content);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

É melhor deixar debug mesmo aqui, senão os logs podem ficar muito grandes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bem observado. Eu mudei e esqueci de retornar. Vou corrigir.

logger.debug("json deserialized: {}", params[i]);

JsonArray jsonArray= jsonElement.getAsJsonArray();
params[0] = gson.fromJson(jsonArray, method.getMethod().getGenericParameterTypes()[0]);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

weird indent

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

other than that, 🚢

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed =)

lucascs added a commit that referenced this pull request Nov 20, 2013
Deserializando lista parametrizada com GsonDeserialization
@lucascs lucascs merged commit 095b4fb into caelum:master Nov 20, 2013
@lucascs
Copy link
Member

lucascs commented Nov 20, 2013

Thanks!

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

Successfully merging this pull request may close these issues.

None yet

2 participants