Exemplo n.º 1
0
 private static String contactDetailToJson(Contact contact) {
   return "{ \"uuid\": \""
       + contact.getUuid()
       + "\", \"name\": \""
       + contact.getName()
       + "\", \"age\": "
       + contact.getAge()
       + ", \"email\": \""
       + contact.getEmail()
       + "\" }";
 }
Exemplo n.º 2
0
 private static String contactSnippetToJson(Contact contact) {
   return "{ \"uuid\": \""
       + contact.getUuid()
       + "\", \"name\": \""
       + contact.getName()
       + "\", \"age\": "
       + contact.getAge()
       + ", \"details\": \"/"
       + contact.getUuid()
       + "\" }";
 }