Example usage for org.json JSONException JSONException

List of usage examples for org.json JSONException JSONException

Introduction

In this page you can find the example usage for org.json JSONException JSONException.

Prototype

public JSONException(Throwable t) 

Source Link

Usage

From source file:edu.mit.media.funf.FunfConfig.java

@SuppressWarnings("unchecked")
private static Bundle getBundle(JSONObject jsonObject) throws JSONException {
    Bundle requestPart = new Bundle();
    Iterator<String> paramNames = jsonObject.keys();
    while (paramNames.hasNext()) {
        String paramName = paramNames.next();
        try {// ww w .j  a  va  2s.  co  m
            BundleUtil.putInBundle(requestPart, paramName, jsonObject.get(paramName));
        } catch (UnstorableTypeException e) {
            throw new JSONException(e.getLocalizedMessage());
        }
    }
    return requestPart;
}