ClientJsonCodec { public static JsonValue encodeWithoutTypeInfo(Object value) { if (value == null) { return Json.createNull(); } else if (GWT.isScript()) { return WidgetUtil.crazyJsoCast(value); } else { if (value instanceof String) { return Json.create((String) value); } else if (value instanceof Number) { return Json.create(((Number) value).doubleValue()); } else if (value instanceof Boolean) { return Json.create(((Boolean) value).booleanValue()); } else if (value instanceof JsonValue) { return (JsonValue) value; } throw new IllegalArgumentException( "Can't encode" + value.getClass() + " to json"); } } private  ClientJsonCodec(); static StateNode decodeStateNode(StateTree tree, JsonValue json); static Object decodeWithTypeInfo(StateTree tree, JsonValue json); @SuppressWarnings("boxing") static Object decodeWithoutTypeInfo(JsonValue json); static JsonValue encodeWithoutTypeInfo(Object value); static JsArray<Object> jsonArrayAsJsArray(JsonArray jsonArray);  }
@Test public void encodeWithoutTypeInfo() { encodePrimitiveValues(ClientJsonCodec::encodeWithoutTypeInfo); }