APISonar


org.apache.tinkerpop.gremlin.driver.ser.Serializers.JSON

> org > apache > tinkerpop > gremlin > driver > ser > Serializers > JSON
org APIs apache APIs tinkerpop APIs gremlin APIs driver APIs ser APIs Serializers APIs JSON APIs

Example 1
public void webSocketsGremlinConcurrentAlternateSerialization() throws Exception {
        final Serializers[] mimes = new Serializers[]{Serializers.JSON, Serializers.JSON_V1D0, Serializers.GRYO_V1D0};
        final Serializers mimeType = mimes[rand.nextInt(3)];
        System.out.println(mimeType);
        final Cluster cluster = Cluster.build("localhost")
                .serializer(mimeType)
                .create();
        final Client client = cluster.connect();
        assertEquals("2", client.submit("1+1").stream().map(Result::getString).findAny().orElse("invalid"));
    }