Source:
<code>public static JsonNode valueToJson(Object x) { JsonNode node; if(x==null) { node=JsonNodeFactory.instance.nullNode(); } else if(x instanceof Date) { node=JsonNodeFactory.instance.textNode(ClientConstants.getDateFormat().format((Date)x)); } else if(x instanceof Number) { if (x instanceof BigDecimal) { node=JsonNodeFactory.instance.numberNode((BigDecimal) x); } else if (x instanceof BigInteger) { node=JsonNodeFactory.instance.numberNode((BigInteger) x); } else if (x instanceof Double) { node=JsonNodeFactory.instance.numberNode((Double) x); } else if (x instanceof Float) { node=JsonNodeFactory.instance.numberNode((Float) x); } else if (x instanceof Long) { node=JsonNodeFactory.instance.numberNode((Long) x); } else { node=JsonNodeFactory.instance.numberNode(((Number) x).intValue()); } } else if(x instanceof Boolean) { node=JsonNodeFactory.instance.booleanNode((Boolean)x); } else if(x instanceof JsonNode) { node=(JsonNode)x; } else if(x instanceof Literal) { node=((Literal)x).node; } else if (x.getClass().isArray()) { if (x instanceof Literal[]) { node = toJson((Literal[]) x); } else if (x instanceof String[]) { node = toJson(values((String[]) x)); } else if (x instanceof Number[]) { node = toJson(numbers((Number[]) x)); } else if (x instanceof int[]){ node = toJson(values((int[]) x)); } else if (x instanceof long[]){ node = toJson(values((long[]) x)); <START> } <END> else { throw new UnsupportedOperationException("Array of type " + x.getClass() + " is not supported."); } } else { node=JsonNodeFactory.instance.textNode(x.toString()); } return node; }</code><technical_language>Date[] boolean[] Boolean[]</technical_language>

Target:
public static JsonNode valueToJson(Object x) { JsonNode node; if(x==null) { node=JsonNodeFactory.instance.nullNode(); } else if(x instanceof Date) { node=JsonNodeFactory.instance.textNode(ClientConstants.getDateFormat().format((Date)x)); } else if(x instanceof Number) { if (x instanceof BigDecimal) { node=JsonNodeFactory.instance.numberNode((BigDecimal) x); } else if (x instanceof BigInteger) { node=JsonNodeFactory.instance.numberNode((BigInteger) x); } else if (x instanceof Double) { node=JsonNodeFactory.instance.numberNode((Double) x); } else if (x instanceof Float) { node=JsonNodeFactory.instance.numberNode((Float) x); } else if (x instanceof Long) { node=JsonNodeFactory.instance.numberNode((Long) x); } else { node=JsonNodeFactory.instance.numberNode(((Number) x).intValue()); } } else if(x instanceof Boolean) { node=JsonNodeFactory.instance.booleanNode((Boolean)x); } else if(x instanceof JsonNode) { node=(JsonNode)x; } else if(x instanceof Literal) { node=((Literal)x).node; } else if (x.getClass().isArray()) { if (x instanceof Literal[]) { node = toJson((Literal[]) x); } else if (x instanceof Object[]) { node = toJson(values((Object[]) x)); } else if (x instanceof int[]) { node = toJson(values((int[]) x)); } else if (x instanceof long[]) { node = toJson(values((long[]) x)); } else if (x instanceof boolean[]) { node = toJson(values((boolean[]) x)); } else { throw new UnsupportedOperationException("Array of type " + x.getClass() + " is not supported."); } } else { node=JsonNodeFactory.instance.textNode(x.toString()); } return node; }