LocalizableTextDDMFormFieldValueAccessor implements DDMFormFieldValueAccessor<JSONObject> { @Override public JSONObject getValue( DDMFormFieldValue ddmFormFieldValue, Locale locale) { Value value = ddmFormFieldValue.getValue(); if (value == null) { return jsonFactory.createJSONObject(); } try { return jsonFactory.createJSONObject(value.getString(locale)); } catch (JSONException jsonException) { if (_log.isDebugEnabled()) { _log.debug("Unable to parse JSON object", jsonException); } return jsonFactory.createJSONObject(); } }  @Override IntFunction<JSONObject[]> getArrayGeneratorIntFunction(); @Override JSONObject getValue(
		DDMFormFieldValue ddmFormFieldValue, Locale locale); @Override JSONObject getValueForEvaluation(
		DDMFormFieldValue ddmFormFieldValue, Locale locale); @Override boolean isEmpty(DDMFormFieldValue ddmFormFieldValue, Locale locale);  }
@Test public void testMalformedJson() { DDMFormFieldValue ddmFormFieldValue = DDMFormValuesTestUtil.createDDMFormFieldValue( "localizableText", new UnlocalizedValue("{")); JSONObject valueJSONObject = _localizableTextDDMFormFieldValueAccessor.getValue( ddmFormFieldValue, LocaleUtil.US); Assert.assertTrue(valueJSONObject.length() == 0); }