class JsonExtensionNotificationDataConverter implements ExtensionNotificationDataConverter {

    @Override
    public Object convertApplicationLastResult(
            final List<LastResult> lastresults) throws ConversionException {
        if (lastresults == null || lastresults.isEmpty()) {
            return null;
        }
        final Context context = Context.enter();
        context.setLanguageVersion(Context.VERSION_DEFAULT);
        final ScriptableObject scope = context.initStandardObjects();
        final LastResult lastresult = lastresults.get(0);
        final Scriptable vxml = context.newObject(scope);
        ScriptableObject.putProperty(vxml, "utterance",
                lastresult.getUtterance());
        ScriptableObject.putProperty(vxml, "confidence",
                lastresult.getConfidence());
        ScriptableObject.putProperty(vxml, "mode", lastresult.getInputmode());
        ScriptableObject.putProperty(vxml, "interpretation",
                lastresult.getInterpretation());
        return toJSON(vxml);
    }

    public  JsonExtensionNotificationDataConverter();

}