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

net.vvakame.util.jsonpullparser.builder.JsonPropertyCoder Maven / Gradle / Ivy

There is a newer version: 1.6.2
Show newest version
package net.vvakame.util.jsonpullparser.builder;

import java.io.IOException;
import java.io.Writer;

import net.vvakame.util.jsonpullparser.JsonFormatException;
import net.vvakame.util.jsonpullparser.JsonPullParser;

/**
 * JSON property coder.
 * @author vvakame
 * @param 
 */
public abstract class JsonPropertyCoder {

	String name;


	/**
	 * Encodes the given instance to JSON format.
	 * @param writer 
	 * @param data
	 * @author vvakame
	 * @throws IOException 
	 */
	public abstract void encode(Writer writer, T data) throws IOException;

	/**
	 * Decodes the given JSON data to an instance.
	 * @param parser 
	 * @param data
	 * @author vvakame
	 * @throws JsonFormatException 
	 * @throws IOException 
	 */
	public abstract void decode(JsonPullParser parser, T data) throws IOException,
			JsonFormatException;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy