public static Object toJSON(Object value) throws OpenDataException {
Object result = value;
try {
ObjectToJsonConverter converter = converters.getToJsonConverter();
result = converter.convertToJson(value, null, JsonConvertOptions.DEFAULT);
} catch (RuntimeException rte) {
throw rte;
} catch (Exception ex) {
OpenDataException odex = new OpenDataException("Cannot convert value: " + value.getClass().getName());
odex.initCause(ex);