Exemple #1
0
 public static JSONObject Evaluacion_toJSONObject(CE_Evaluacion elemento) {
   JSONObject json = new JSONObject();
   try {
     json.put("id_evaluacion", elemento.getEv_id_evaluacion());
     json.put("mensaje", elemento.getEv_mensaje());
     json.put("descripcion", elemento.getEv_descripcion());
     json.put("estado", elemento.getEv_estado());
     if (elemento.ref_seccion != null)
       json.put("secciones", CE_Seccion.Seccion_toJSON(elemento.ref_seccion));
     else
       json.put(
           "secciones",
           CE_Seccion.Seccion_toJSON(
               CE_Seccion.secciones(elemento.getEv_id_evaluacion().toString())));
   } catch (Exception ex) {
     Logger.getLogger(CE_Evaluacion.class.getName()).log(Level.SEVERE, null, ex);
   }
   return json;
 }