ClientJsonCodec { @SuppressWarnings("boxing") public static Object decodeWithoutTypeInfo(JsonValue json) { if (GWT.isScript()) { return json; } else { switch (json.getType()) { case BOOLEAN: return json.asBoolean(); case STRING: return json.asString(); case NUMBER: return json.asNumber(); case NULL: return null; default: throw new IllegalArgumentException( "Can't (yet) convert " + json.getType()); } } } 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 decodeWithoutTypeInfo() { decodePrimitiveValues(ClientJsonCodec::decodeWithoutTypeInfo); }
@Test(expected = IllegalArgumentException.class) public void testDecodeWithoutTypeInfo_arrayUnsupported() { ClientJsonCodec.decodeWithoutTypeInfo(Json.createArray()); }
@Test(expected = IllegalArgumentException.class) public void testDecodeWithoutTypeInfo_objectUnsupported() { ClientJsonCodec.decodeWithoutTypeInfo(Json.createObject()); }