@Test public void testParsingNoDataNumberMixedSpace() throws Exception { final String data = "{'id': \"123\", \"size\":69124, \r\n'ack' :true }"; Reader r = new StringReader(data); JSONObject jsonpart = SimpleRestInterceptor.parseJsonPart(r); Map<String, Object> expectedHeaders = new HashMap<String, Object>(); expectedHeaders.put("id", "123"); expectedHeaders.put("size", 69124); expectedHeaders.put("ack", true); verify(jsonpart, r, expectedHeaders, ""); }
protected static JSONObject parseJsonPart(Reader reader) throws JSONException { return (JSONObject)(new JSONTokener(reader).nextValue()); }
SimpleRestInterceptor extends AtmosphereInterceptorAdapter { protected static JSONObject parseJsonPart(Reader reader) throws JSONException { return (JSONObject)(new JSONTokener(reader).nextValue()); } }
SimpleRestInterceptor extends AtmosphereInterceptorAdapter { protected static JSONObject parseJsonPart(Reader reader) throws JSONException { return (JSONObject)(new JSONTokener(reader).nextValue()); } SimpleRestInterceptor(); }
SimpleRestInterceptor extends AtmosphereInterceptorAdapter { protected static JSONObject parseJsonPart(Reader reader) throws JSONException { return (JSONObject)(new JSONTokener(reader).nextValue()); } SimpleRestInterceptor(); @Override void configure(AtmosphereConfig config); @Override Action inspect(final AtmosphereResource r); }
SimpleRestInterceptor extends AtmosphereInterceptorAdapter { protected static JSONObject parseJsonPart(Reader reader) throws JSONException { return (JSONObject)(new JSONTokener(reader).nextValue()); } SimpleRestInterceptor(); @Override void configure(AtmosphereConfig config); @Override Action inspect(final AtmosphereResource r); final static String PROTOCOL_DETACHED_KEY; final static String X_ATMOSPHERE_SIMPLE_REST_PROTOCOL_DETACHED; final static String X_REQUEST_KEY; }