Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.util.Log;
import org.json.JSONException;
import org.json.JSONObject;

public class Main {
    private static final String TAG = "RecipeAssistant";

    public static JSONObject parseJSON(String jsonString) {
        JSONObject jsonObject = null;
        try {
            jsonObject = new JSONObject(jsonString);
        } catch (JSONException e) {
            Log.e(TAG, "Failed to parse JSON string " + jsonString + ": " + e);
        }
        return jsonObject;
    }
}