package com.shikshak;

import java.io.Serializable;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement(name = "user")
public class User implements Serializable {

   private static final long serialVersionUID = 1L;
   private int id;
   private String name;

   public User(){}
   
   public User(int id, String name){
      this.id = id;
      this.name = name;
   }

   public int getId() {
      return id;
   }

   @XmlElement
   public void setId(int id) {
      this.id = id;
   }
   public String getName() {
      return name;
   }
   @XmlElement
   public void setName(String name) {
      this.name = name;
   }
   
   @Override
   public String toString() {
		return "Track [title=" + id + ", singer=" + name + "]";
	}
  	
}
@@ -140,16 +140,52 @@
 lement;%0A
+%0Aimport org.json.simple.JSONObject;%0A
 @XmlRoot
@@ -195,23 +195,8 @@
 ment
-(name = %22user%22)
 %0Apub
@@ -749,62 +749,119 @@
 %7B%0A%09%09
-return %22Track %5Btitle=%22 + id + %22, singer=%22 + name + %22%5D%22
+JSONObject json = new JSONObject();%0A%09%09json.put(%22id%22, id);%0A%09%09json.put(%22name%22,name);%0A%09%09return json.toJSONString()
 ;%0A%09%7D

change to return json object string