You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1234567891011121314151617181920212223242526
  1. package com.rthoni.stssaguenay.dbo;
  2. import org.json.JSONException;
  3. import org.json.JSONObject;
  4. import java.util.HashMap;
  5. /**
  6. * Created by robin on 11/27/15.
  7. */
  8. public abstract class LuDbo {
  9. public abstract void fromJson(JSONObject json) throws JSONException;
  10. public abstract HashMap<String, Object> toArray();
  11. public JSONObject toJson()
  12. {
  13. return new JSONObject(toArray());
  14. }
  15. @Override
  16. public String toString() {
  17. return toJson().toString();
  18. }
  19. }