Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created March 19, 2019 00:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/292bd4c7a868f62aeb1315bdcf694fbb to your computer and use it in GitHub Desktop.
Save parzibyte/292bd4c7a868f62aeb1315bdcf694fbb to your computer and use it in GitHub Desktop.
public static void main(String[] args) {
String[] amigos = {"Guayaba", "Snowball", "Cuco"};
Raza raza = new Raza("Caniche", "Francia");
Mascota mascota = new Mascota("Maggie", 3, amigos, raza);
JSONObject jsonObject = new JSONObject(mascota);
String codificado = jsonObject.toString();
System.out.println("Codificado: " + codificado);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment