![JAR search and dependency download from the Maven repository](/logo.png)
org.loom.appengine.json.KeySerializer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of loom-appengine Show documentation
Show all versions of loom-appengine Show documentation
Uploads all artifacts belonging to configuration ':archives'.
The newest version!
package org.loom.appengine.json;
import java.io.IOException;
import org.codehaus.jackson.JsonGenerator;
import org.codehaus.jackson.JsonProcessingException;
import org.codehaus.jackson.map.JsonSerializer;
import org.codehaus.jackson.map.SerializerProvider;
import com.google.appengine.api.datastore.Key;
import com.google.appengine.api.datastore.KeyFactory;
/**
* Used by jackson to serializes a {@link Key} instance to its String representation
* @author Nacho
*
*/
public class KeySerializer extends JsonSerializer {
@Override
public void serialize(Key value, JsonGenerator jgen,
SerializerProvider provider) throws IOException,
JsonProcessingException {
jgen.writeString(KeyFactory.keyToString(value));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy