public JSONObject toJSON() throws JSONException {
  JSONObject json=new JSONObject();
  if (entries.size() > 0) {
    JSONObject history=new JSONObject();
    for (    Entry e : entries) {
      history.put(e.pushId,e.timestamp);
    }
    json.put("seen",history);
  }
  json.putOpt("lastTime",lastTime);
  return json;
}

public JSONObject toJSON ( ) throws JSONException { JSONObject json = new JSONObject ( ) ; if ( entries . size ( ) > 0 ) { JSONObject history = new JSONObject ( ) ; for ( Entry e : entries ) { history . put ( e . pushId , e . timestamp ) ; } json . put ( "seen" , history ) ; } json . putOpt ( "lastTime" , lastTime ) ; return json ; }
serializes the history state to a json object using the format described in loadjson ( ) .
