@Test public void serializesKitchenSink() { NodeMapper mapper = new NodeMapper(); Node result = mapper.serialize(new KitchenSink()); Node.assertEquals(result, Node.parse("{\n" + " \"long\": 4,\n" + " \"float\": 5.0,\n" + " \"string\": \"string\",\n" + " \"shapeId\": \"foo.baz#Bar\",\n" + " \"double\": 6.0,\n" + " \"boolean\": true,\n" + " \"enum\": \"array\",\n" + " \"int\": 3,\n" + " \"presentString\": \"present\",\n" + " \"short\": 2,\n" + " \"boolean2\": true,\n" + " \"byte\": 1,\n" + " \"map\": {\n" + " \"b\": [\n" + " \"2\",\n" + " \"3\"\n" + " ],\n" + " \"a\": [\n" + " \"1\",\n" + " \"2\"\n" + " ]\n" + " },\n" + " \"complexList\": [\n" + " [\n" + " \"a\",\n" + " \"b\"\n" + " ],\n" + " [\n" + " \"c\",\n" + " \"d\"\n" + " ]\n" + " ],\n" + " \"falseBoolean\": false,\n" + " \"stringIterable\": [\n" + " \"foo\",\n" + " \"baz\"\n" + " ]\n" + "}")); }
public Node serialize(Object object) { return serialize(object, Collections.newSetFromMap(new IdentityHashMap<>())); }
NodeMapper { public Node serialize(Object object) { return serialize(object, Collections.newSetFromMap(new IdentityHashMap<>())); } }
NodeMapper { public Node serialize(Object object) { return serialize(object, Collections.newSetFromMap(new IdentityHashMap<>())); }  }
NodeMapper { public Node serialize(Object object) { return serialize(object, Collections.newSetFromMap(new IdentityHashMap<>())); }  void setSerializeNullValues(boolean serializeNullValues); boolean getSerializeNullValues(); void setWhenMissingSetter(WhenMissing whenMissing); WhenMissing getWhenMissingSetter(); void disableToNodeForClass(Class type); void enableToNodeForClass(Class type); Set<Class> getDisableToNode(); void disableFromNodeForClass(Class type); void enableFromNodeForClass(Class type); Set<Class> getDisableFromNode(); boolean getOmitEmptyValues(); void setOmitEmptyValues(boolean omitEmptyValues); Node serialize(Object object); T deserialize(Node value, Class<T> into); T deserializeInto(Node value, T objectToMutate); @SuppressWarnings("unchecked") V deserializeCollection(
            Node value,
            Class<T> into,
            Class<U> members
    ); @SuppressWarnings("unchecked") V deserializeMap(
            Node value, Class<T> into,
            Class<U> members
    ); }
NodeMapper { public Node serialize(Object object) { return serialize(object, Collections.newSetFromMap(new IdentityHashMap<>())); }  void setSerializeNullValues(boolean serializeNullValues); boolean getSerializeNullValues(); void setWhenMissingSetter(WhenMissing whenMissing); WhenMissing getWhenMissingSetter(); void disableToNodeForClass(Class type); void enableToNodeForClass(Class type); Set<Class> getDisableToNode(); void disableFromNodeForClass(Class type); void enableFromNodeForClass(Class type); Set<Class> getDisableFromNode(); boolean getOmitEmptyValues(); void setOmitEmptyValues(boolean omitEmptyValues); Node serialize(Object object); T deserialize(Node value, Class<T> into); T deserializeInto(Node value, T objectToMutate); @SuppressWarnings("unchecked") V deserializeCollection(
            Node value,
            Class<T> into,
            Class<U> members
    ); @SuppressWarnings("unchecked") V deserializeMap(
            Node value, Class<T> into,
            Class<U> members
    );  }