Package jodd.json.mock

Examples of jodd.json.mock.Surfer


    assertAttributeMissing("nicknamesAsArray", json);
  }

  @Test
  public void testIncludesExcludes() throws FileNotFoundException {
    Surfer surfer = Surfer.createSurfer();

    String json = new JsonSerializer().serialize(surfer);

    assertAttribute("name", json);
    assertStringValue("jodd", json);
View Full Code Here


public class JsonValueContextTest {

  @Test
  public void testJsonValueContextBean() {
    Surfer surfer = new Surfer();

    surfer.setName("Igor");
    surfer.setSplit("long wave");

    JsonSerializer jsonSerializer = new JsonSerializer()
        .use(String.class, new MyTypeJsonSerializer());

    String json = jsonSerializer.serialize(surfer);
View Full Code Here

    assertEquals("[\"one\",\"TWO\",\"three\"]", json);
  }

  @Test
  public void testJsonValueContextArray2() {
    Object[] array = new Object[] {new Surfer(), "two", "three"};

    JsonSerializer jsonSerializer = new JsonSerializer()
        .use(String.class, new MyTypeJsonSerializer2());

    String json = jsonSerializer.serialize(array);
View Full Code Here

TOP

Related Classes of jodd.json.mock.Surfer

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.