@Override public Object getValue(ELContext context, Object base, Object property) { if (base instanceof JSONObject) { context.setPropertyResolved(true); return ((JSONObject) base).opt(String.valueOf(property)); } if (base instanceof JSONArray) { context.setPropertyResolved(true); int index = toInt(property); return ((JSONArray) base).opt(index); } return null; }
@Override public Object getValue(ELContext context, Object base, Object property) { if (base instanceof JSONObject) { context.setPropertyResolved(true); return ((JSONObject) base).opt(String.valueOf(property)); } if (base instanceof JSONArray) { context.setPropertyResolved(true); int index = toInt(property); return ((JSONArray) base).opt(index); } return null; }
@Override public Object getValue(ELContext context, Object base, Object property) { if (base instanceof JSONObject) { context.setPropertyResolved(true); return ((JSONObject) base).opt(String.valueOf(property)); } if (base instanceof JSONArray) { context.setPropertyResolved(true); int index = toInt(property); return ((JSONArray) base).opt(index); } return null; }
@Override public Object getValue(ELContext context, Object base, Object property) { if (base instanceof JSONObject) { context.setPropertyResolved(true); return ((JSONObject) base).opt(String.valueOf(property)); } if (base instanceof JSONArray) { context.setPropertyResolved(true); int index = toInt(property); return ((JSONArray) base).opt(index); } return null; }
@Override public Object getValue(ELContext context, Object base, Object property) { if (base instanceof JSONObject) { context.setPropertyResolved(true); return ((JSONObject) base).opt(String.valueOf(property)); } if (base instanceof JSONArray) { context.setPropertyResolved(true); int index = toInt(property); return ((JSONArray) base).opt(index); } return null; }
@Override public void setValue(ELContext context, Object base, Object property, Object value) { if (base instanceof JSONObject) { context.setPropertyResolved(true); try { ((JSONObject) base).put(String.valueOf(property), value); } catch (JSONException e) { throw new ELException(e); } context.setPropertyResolved(true); } if (base instanceof JSONArray) { context.setPropertyResolved(true); int index = toInt(property); try { ((JSONArray) base).put(index, value); } catch (JSONException e) { throw new ELException(e); } context.setPropertyResolved(true); } }
@Override public void setValue(ELContext context, Object base, Object property, Object value) { if (base instanceof JSONObject) { context.setPropertyResolved(true); try { ((JSONObject) base).put(String.valueOf(property), value); } catch (JSONException e) { throw new ELException(e); } context.setPropertyResolved(true); } if (base instanceof JSONArray) { context.setPropertyResolved(true); int index = toInt(property); try { ((JSONArray) base).put(index, value); } catch (JSONException e) { throw new ELException(e); } context.setPropertyResolved(true); } }
@Override public void setValue(ELContext context, Object base, Object property, Object value) { if (base instanceof JSONObject) { context.setPropertyResolved(true); try { ((JSONObject) base).put(String.valueOf(property), value); } catch (JSONException e) { throw new ELException(e); } context.setPropertyResolved(true); } if (base instanceof JSONArray) { context.setPropertyResolved(true); int index = toInt(property); try { ((JSONArray) base).put(index, value); } catch (JSONException e) { throw new ELException(e); } context.setPropertyResolved(true); } }
@Override public void setValue(ELContext context, Object base, Object property, Object value) { if (base instanceof JSONObject) { context.setPropertyResolved(true); try { ((JSONObject) base).put(String.valueOf(property), value); } catch (JSONException e) { throw new ELException(e); } context.setPropertyResolved(true); } if (base instanceof JSONArray) { context.setPropertyResolved(true); int index = toInt(property); try { ((JSONArray) base).put(index, value); } catch (JSONException e) { throw new ELException(e); } context.setPropertyResolved(true); } }
@Override public void setValue(ELContext context, Object base, Object property, Object value) { if (base instanceof JSONObject) { context.setPropertyResolved(true); try { ((JSONObject) base).put(String.valueOf(property), value); } catch (JSONException e) { throw new ELException(e); } context.setPropertyResolved(true); } if (base instanceof JSONArray) { context.setPropertyResolved(true); int index = toInt(property); try { ((JSONArray) base).put(index, value); } catch (JSONException e) { throw new ELException(e); } context.setPropertyResolved(true); } }