Last active
February 8, 2017 22:39
-
-
Save kroovysteph/1d853d19a3b31c733d403b73fe3941e8 to your computer and use it in GitHub Desktop.
This file contains 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
/** | |
* download: http://central.maven.org/maven2/com/google/code/gson/gson/2.8.0/gson-2.8.0.jar | |
* | |
* compile: javac -cp .:gson-2.8.0.jar Account.java | |
* run : java -cp .:gson-2.8.0.jar Account | |
*/ | |
import com.google.gson.Gson; | |
public class Account { | |
String login = "kroovy"; | |
String password = "ofeejewfwoij"; | |
public static void main (String[] args) { | |
Account acc = new Account(); | |
Gson gson = new Gson(); | |
Object request = gson.toJson(acc); | |
System.out.println(request); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment