1
0
Fork 0

Proper serialization of custom fields values. Before ValueTuple was serialized to toString();

master
Witek Wołejszo 2014-04-25 12:16:30 +02:00
parent 080d014ff7
commit 87f72b34e8
1 changed files with 6 additions and 0 deletions

View File

@ -574,6 +574,12 @@ public final class Field {
} else if (m.type.equals("string")) {
if (value instanceof List)
return toJsonMap((List)value);
else if (value instanceof ValueTuple) {
JSONObject json = new JSONObject();
ValueTuple tuple = (ValueTuple)value;
json.put(tuple.type, tuple.value.toString());
return json.toString();
}
return value.toString();
} else if (m.type.equals("timetracking")) {