APISonar


com.google.cloud.logging.Payload.Type.JSON

> com > google > cloud > logging > Payload > Type > JSON
com APIs google APIs cloud APIs logging APIs Payload APIs Type APIs JSON APIs

Example 1
public void testOf() {
    assertEquals(Type.STRING, STRING_PAYLOAD.getType());
    assertEquals(STRING_DATA, STRING_PAYLOAD.getData());
    assertEquals(Type.JSON, JSON_PAYLOAD.getType());
    assertEquals(STRUCT_DATA, JSON_PAYLOAD.getData());
    assertEquals(JSON_DATA, JSON_PAYLOAD.getDataAsMap());
    assertEquals(Type.PROTO, PROTO_PAYLOAD.getType());
    assertEquals(PROTO_DATA, PROTO_PAYLOAD.getData());
    JsonPayload jsonPayload = JsonPayload.of(STRUCT_DATA);
    assertEquals(Type.JSON, jsonPayload.getType());
    assertEquals(STRUCT_DATA, jsonPayload.getData());
    assertEquals(JSON_DATA, jsonPayload.getDataAsMap());
  }