Some javadocs

This commit is contained in:
Dave Syer 2013-06-05 06:58:35 +01:00
parent e60efc7e55
commit fc021fc86a
3 changed files with 17 additions and 0 deletions

View File

@ -21,6 +21,8 @@ import java.util.Map;
import com.fasterxml.jackson.databind.ObjectMapper;
/**
* Thin wrapper for Jackson 2 {@link ObjectMapper}.
*
* @author Dave Syer
*
*/

View File

@ -25,11 +25,24 @@ import org.springframework.util.ClassUtils;
import org.springframework.util.StringUtils;
/**
* Really basic JSON parser for when you have nothing else available. Comes with some
* limitations with respect to the JSON specification (e.g. only supports String values),
* so users will probably prefer to have a library handle things instead (Jackson or Snake
* YAML are supported).
*
* @see #instance()
*
* @author Dave Syer
*
*/
public class SimpleJsonParser implements JsonParser {
/**
* Static factory for the "best" JSON parser available on the classpath. Tries Jackson
* (2), then Snake YAML, and then falls back to the {@link SimpleJsonParser}.
*
* @return a {@link JsonParser}
*/
public static JsonParser instance() {
if (ClassUtils.isPresent("org.yaml.snakeyaml.Yaml", null)) {
return new YamlParser();

View File

@ -21,6 +21,8 @@ import java.util.Map;
import org.yaml.snakeyaml.Yaml;
/**
* Thin wrapper for Snake {@link Yaml}.
*
* @author Dave Syer
*
*/