[Fix] Fixed StrolchValueType.valueToJson()

This commit is contained in:
Robert von Burg 2020-07-07 16:17:40 +02:00
parent 4029fd7d1c
commit 3959cf4a26
1 changed files with 4 additions and 4 deletions

View File

@ -47,7 +47,7 @@ public enum StrolchValueType {
BOOLEAN("Boolean") { BOOLEAN("Boolean") {
@Override @Override
public JsonPrimitive valueToJson(Object value) { public JsonPrimitive valueToJson(Object value) {
return new JsonPrimitive(((Boolean) value).toString()); return new JsonPrimitive(((Boolean) value));
} }
@Override @Override
@ -88,7 +88,7 @@ public enum StrolchValueType {
INTEGER("Integer") { INTEGER("Integer") {
@Override @Override
public JsonPrimitive valueToJson(Object value) { public JsonPrimitive valueToJson(Object value) {
return new JsonPrimitive(((Integer) value).toString()); return new JsonPrimitive(((Integer) value));
} }
@Override @Override
@ -129,7 +129,7 @@ public enum StrolchValueType {
FLOAT("Float") { FLOAT("Float") {
@Override @Override
public JsonPrimitive valueToJson(Object value) { public JsonPrimitive valueToJson(Object value) {
return new JsonPrimitive(value.toString()); return new JsonPrimitive((Double) value);
} }
@Override @Override
@ -167,7 +167,7 @@ public enum StrolchValueType {
LONG("Long") { LONG("Long") {
@Override @Override
public JsonPrimitive valueToJson(Object value) { public JsonPrimitive valueToJson(Object value) {
return new JsonPrimitive(value.toString()); return new JsonPrimitive((Long) value);
} }
@Override @Override