Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

LuDbo.java 501B

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. }