Package jodd.json.model

Examples of jodd.json.model.Account


    assertEquals(spiderman.superpower, jsonSpiderman.superpower);
  }

  @Test
  public void testAutoTypeConvertToNumerical() {
    Account account = new JsonParser()
        .parse("{\"id\": \"5\", \"accountNumber\": \"1234567-123\"}", Account.class);
    assertEquals(new Integer(5), account.getId());

    XRayVision xray = new JsonParser().parse("{ \"power\": \"2.3\" }", XRayVision.class);
    assertEquals(2.3f, xray.getPower(), DELTA);
  }
View Full Code Here

TOP

Related Classes of jodd.json.model.Account

Copyright © 2018 www.massapicom. 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.