pl.szczepanik.silencio.processors.visitors.AbstractJacksonVisitor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of silencio Show documentation
Show all versions of silencio Show documentation
Silencio is a Java library for transforming and converting XML, JSON, Properties, YAML and other formats. It
is applicable for most operations such as obfuscation, encryption, minimisation (minifying), anonymous. Library
is fully customizable and extensible.
The newest version!
package pl.szczepanik.silencio.processors.visitors;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.List;
import java.util.Map;
import pl.szczepanik.silencio.core.Key;
import pl.szczepanik.silencio.core.ProcessorException;
/**
* Collects common methods and attributes used by visitors that implements Jackson's library.
*
* @author Damian Szczepanik (damianszczepanik@github)
*/
public abstract class AbstractJacksonVisitor extends AbstractVisitor {
/**
* Process map or array/list objects.
*
* @param key key
* @param value value that should be converted
*/
protected void processComplex(String key, Object value) {
if (isMap(value)) {
processMap((Map) value);
} else if (isArray(value)) {
processArray(key, (List