Skip to content

Instantly share code, notes, and snippets.

@shalithasuranga
Created November 12, 2018 06:41
Show Gist options
  • Save shalithasuranga/6d4efa7c51d1a7a5abd7e4df6e125277 to your computer and use it in GitHub Desktop.
Save shalithasuranga/6d4efa7c51d1a7a5abd7e4df6e125277 to your computer and use it in GitHub Desktop.
public class PersonSerialize {
public static void main(String[] args) throws Exception{
JsonSerializer jsonSerializer = JsonSerializer.DEFAULT_READABLE;
String[] nickNames = {"Jil", "Bil", "Rock"};
Person pojo = new Person("Jackson", "Colombo", 24, nickNames);
String json = jsonSerializer.serialize(pojo);
System.out.println(json);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment