Commit 70147ec8 by Juho Juopperi

Merge branch 'master' of gitlab.codecrew.fi:codecrew/moya into devel

2 parents b7107a38 827a0e4f
......@@ -58,7 +58,9 @@ public class JsonAttributeConverter implements AttributeConverter<JsonObject, PG
// Read the value as JSON
String stringValue = pgObject.getValue();
if (stringValue != null) {
// We must test for "null" because pgObject.getValues() seems to return "null" for null :)
if (stringValue != null && !stringValue.toLowerCase().equals("null")) {
JsonReader jsonReader = Json.createReader(new StringReader(stringValue));
JsonObject jsonObject = jsonReader.readObject();
log.info("Converted PGobject to JsonObject: {}", jsonObject);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!