All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.tinkerpop.rexster.protocol.serializer.json.templates.BindingsTemplate Maven / Gradle / Ivy

There is a newer version: 2.6.0
Show newest version
package com.tinkerpop.rexster.protocol.serializer.json.templates;

import com.tinkerpop.rexster.protocol.msg.RexProBindings;
import org.codehaus.jackson.JsonNode;

import java.util.Map;

/**
 * @author Blake Eggleston (bdeggleston.github.com)
 */
public class BindingsTemplate implements JsonTemplate {
    @Override
    public RexProBindings deserialize(JsonNode json) {
        return new RexProBindings((Map) JsonConverter.fromJsonNode(json));
    }

    @Override
    public JsonNode serialize(RexProBindings src) {
        return JsonConverter.toJsonNode(src);
    }


    public static BindingsTemplate instance = new BindingsTemplate();
    static public BindingsTemplate getInstance() {
        return instance;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy