@Test public void testFromJson() { JsonNode jsonNode = JsonNodeFactory.withExactBigDecimals(false).binaryNode(new byte[0]); Object fromJson = binaryType.fromJson(jsonNode); assertTrue(fromJson instanceof byte[]); }
@Override public Object fromJson(JsonNode node) { if (node == null || node instanceof NullNode) { return null; } else if (node.isValueNode()) { try { return node.binaryValue(); } catch (Exception e) { } } throw Error.get(NAME, MetadataConstants.ERR_INCOMPATIBLE_VALUE, node.toString()); }
BinaryType implements Type, Serializable { @Override public Object fromJson(JsonNode node) { if (node == null || node instanceof NullNode) { return null; } else if (node.isValueNode()) { try { return node.binaryValue(); } catch (Exception e) { } } throw Error.get(NAME, MetadataConstants.ERR_INCOMPATIBLE_VALUE, node.toString()); } }
BinaryType implements Type, Serializable { @Override public Object fromJson(JsonNode node) { if (node == null || node instanceof NullNode) { return null; } else if (node.isValueNode()) { try { return node.binaryValue(); } catch (Exception e) { } } throw Error.get(NAME, MetadataConstants.ERR_INCOMPATIBLE_VALUE, node.toString()); } private  BinaryType(); }
BinaryType implements Type, Serializable { @Override public Object fromJson(JsonNode node) { if (node == null || node instanceof NullNode) { return null; } else if (node.isValueNode()) { try { return node.binaryValue(); } catch (Exception e) { } } throw Error.get(NAME, MetadataConstants.ERR_INCOMPATIBLE_VALUE, node.toString()); } private  BinaryType(); @Override String getName(); @Override boolean supportsEq(); @Override boolean supportsOrdering(); @Override int compare(Object v1, Object v2); @Override Object cast(Object obj); @Override JsonNode toJson(JsonNodeFactory factory, Object obj); @Override Object fromJson(JsonNode node); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString(); }
BinaryType implements Type, Serializable { @Override public Object fromJson(JsonNode node) { if (node == null || node instanceof NullNode) { return null; } else if (node.isValueNode()) { try { return node.binaryValue(); } catch (Exception e) { } } throw Error.get(NAME, MetadataConstants.ERR_INCOMPATIBLE_VALUE, node.toString()); } private  BinaryType(); @Override String getName(); @Override boolean supportsEq(); @Override boolean supportsOrdering(); @Override int compare(Object v1, Object v2); @Override Object cast(Object obj); @Override JsonNode toJson(JsonNodeFactory factory, Object obj); @Override Object fromJson(JsonNode node); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString(); static final Type TYPE; static final String NAME; }