Created
August 25, 2017 12:13
-
-
Save gaborify/d4004c2200de1a87f2c1cc3f72a146a8 to your computer and use it in GitHub Desktop.
Gson deserialization #java #gson #json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final String json = "{ username: 'Han Solo', password: 'jabbawockeez'}"; | |
final Gson gson = new GsonBuilder().create(); | |
final Person han = gson.fromJson(json, new TypeToken<Person>(){}.getType()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment