package com.openxc.remote.sources;

import org.json.JSONException;
import org.json.JSONObject;

import android.util.Log;

public abstract class JsonVehicleDataSource
        extends AbstractVehicleDataSource {
    private static final String TAG = "JsonVehicleDataSource";

    public JsonVehicleDataSource() {
        super();
    }

    public JsonVehicleDataSource(VehicleDataSourceCallbackInterface callback) {
        super(callback);
    }

    protected void parseJson(String json) {
        final JSONObject message;

        try {
            message = new JSONObject(json);
        } catch(JSONException e) {
            Log.i(TAG, "Couldn't decode JSON from: " + json);
            return;
        }

        try {
            Log.d("FRING", message.toString());
            handleMessage(message.getString("name"),
                    message.getDouble("value"));
            return;
        } catch(JSONException e) {
        }
        try {
            handleMessage(message.getString("name"),
                    message.getString("value"));
        } catch(JSONException e) {
            Log.w(TAG, "JSON value wasn't a double or string -- couldn't parse",
                    e);
        }
    }
}

@@ -723,56 +723,8 @@
 y %7B%0A
-            Log.d(%22FRING%22, message.toString());%0A
     

Remove stray debug log statement.