private static void config(Properties properties) {
        {
            String featuresProperty = properties.getProperty("fastjson.serializerFeatures.MapSortField");
            int mask = SerializerFeature.MapSortField.getMask();
            if ("true".equals(featuresProperty)) {
                DEFAULT_GENERATE_FEATURE |= mask;
            } else if ("false".equals(featuresProperty)) {
                DEFAULT_GENERATE_FEATURE &= ~mask;
            }
        }

        {
            if ("true".equals(properties.getProperty("parser.features.NonStringKeyAsString"))) {
                DEFAULT_PARSER_FEATURE |= Feature.NonStringKeyAsString.getMask();
            }
        }

        {
            if ("true".equals(properties.getProperty("parser.features.ErrorOnEnumNotMatch"))
                    || "true".equals(properties.getProperty("fastjson.parser.features.ErrorOnEnumNotMatch")))
            {
                DEFAULT_PARSER_FEATURE |= Feature.ErrorOnEnumNotMatch.getMask();
            }
        }

        {
            if ("false".equals(properties.getProperty("fastjson.asmEnable"))) {
                ParserConfig.global.setAsmEnable(false);
                SerializeConfig.globalInstance.setAsmEnable(false);
            }
        }
    }
This is the main class for using Fastjson. You usually call these two methods {@link #toJSONString(Object)} and {@link #parseObject(String, Class)}.

<p>Here is an example of how fastjson is used for a simple Class:

<pre>
Model model = new Model();
String json = JSON.toJSONString(model); // serializes model to Json
Model model2 = JSON.parseObject(json, Model.class); // deserializes json into model2
</pre>

<p>If the object that your are serializing/deserializing is a {@code ParameterizedType}
(i.e. contains at least one type parameter and may be an array) then you must use the
{@link #toJSONString(Object)} or {@link #parseObject(String, Type, Feature[])} method.  Here is an
example for serializing and deserialing a {@code ParameterizedType}:

<pre>
String json = "[{},...]";
Type listType = new TypeReference&lt;List&lt;Model&gt;&gt;() {}.getType();
List&lt;Model&gt; modelList = JSON.parseObject(json, listType);
</pre>

@see com.alibaba.fastjson.TypeReference

@author wenshao[szujobs@hotmail.com]
src/main/java/com/alibaba/fastjson/JSON.java