Examples of JsonRepresentation


Examples of org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation

    }

   
    private static void then(RestfulResponse<ActionResultRepresentation> restfulResponse) throws JsonParseException, JsonMappingException, IOException {
        assertThat(restfulResponse.getHeader(Header.CONTENT_TYPE), hasMediaTypeProfile(MediaType.APPLICATION_JSON));
        final JsonRepresentation errorRepr = restfulResponse.wraps(JsonRepresentation.class).getEntity();

        assertThat(errorRepr.getString("from.invalidReason"), is("No 'value' key"));
    }
View Full Code Here

Examples of org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation

    @Test
    public void usingClientFollow() throws Exception {

        // given
        final JsonRepresentation givenAction = Util.givenAction(client, "ActionsEntities", "list");
        final ObjectActionRepresentation actionRepr = givenAction.as(ObjectActionRepresentation.class);

        final LinkRepresentation invokeLink = actionRepr.getInvoke();

        assertThat(invokeLink, isLink(client)
                                    .rel(Rel.INVOKE)
View Full Code Here

Examples of org.restlet.ext.json.JsonRepresentation

        } catch (JSONException e) {
            //throw new ResourceException(Status.SERVER_ERROR_INTERNAL);
        }

        JsonRepresentation jr = new JsonRepresentation(json);

        jr.setCharacterSet(CharacterSet.UTF_8);

        //
        // store result
        item.getProperties().put(RestletConsumer.RESTLET_RESOURCE_OUT_REPRESENTATION,jr);
View Full Code Here

Examples of ru.yandex.strictweb.ajaxtools.representation.JsonRePresentation

            if(em == null) return createFakeEntity(clazz, primaryKey);
          return em.find(clazz, primaryKey);
        }
      };
     
      JsonRePresentation rep = new JsonRePresentation(ef).reset(input);
     
      if(rep.lexer.yylex() != Yytoken.TYPE_LEFT_SQUARE) throw new ParseException("request args should be passed as array");
     
      for(int i=0;;i++) {
          AjaxRequestResult result = new AjaxRequestResult();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.