Skip to content

Instantly share code, notes, and snippets.

@kroovysteph
Last active February 8, 2017 22:39
Show Gist options
  • Save kroovysteph/1d853d19a3b31c733d403b73fe3941e8 to your computer and use it in GitHub Desktop.
Save kroovysteph/1d853d19a3b31c733d403b73fe3941e8 to your computer and use it in GitHub Desktop.
/**
* 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