Package com.google.collide.dtogen.server.TestDtoServerImpls

Examples of com.google.collide.dtogen.server.TestDtoServerImpls.ComplicatedDtoImpl.toJson()


    dtoImpl.setIntId(1);
    dtoImpl.setSimpleEnum(null);

    // Make it json and pull it back out.
    Gson gson = new GsonBuilder().serializeNulls().create();
    String serialized = dtoImpl.toJson();
    assertEquals(dtoToJson(gson, dtoImpl), serialized);

    ComplicatedDto dto = ComplicatedDtoImpl.fromJsonString(serialized);
    assertEquals(1, dto.getIntId());
    assertNull(dto.getSimpleEnum());
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.