flexjson.JSONContext Maven / Gradle / Ivy
/**
* Copyright 2007 Charlie Hubbard and Brandon Goodin
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
* implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
package flexjson;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Stack;
import flexjson.transformer.NullTransformer;
import flexjson.transformer.Transformer;
import flexjson.transformer.TransformerWrapper;
import flexjson.transformer.TypeTransformerMap;
public class JSONContext
{
private static ThreadLocal context= new ThreadLocal()
{
protected JSONContext initialValue()
{
return new JSONContext();
}
};
private String rootName;
private OutputHandler out;
private boolean prettyPrint= false;
private Stack typeContextStack= new Stack();
private int indent= 0;
private TypeTransformerMap typeTransformerMap;
private Map pathTransformerMap;
private List pathExpressions;
private SerializationType serializationType= SerializationType.SHALLOW;
private ChainedSet visits= new ChainedSet(Collections.EMPTY_SET);
private Stack
© 2015 - 2025 Weber Informatics LLC | Privacy Policy