Examples of config()


Examples of com.alibaba.fastjson.serializer.JSONSerializer.config()

        SerializeWriter out = new SerializeWriter();

        try {
            JSONSerializer serializer = new JSONSerializer(out);
            for (com.alibaba.fastjson.serializer.SerializerFeature feature : features) {
                serializer.config(feature, true);
            }

            serializer.config(SerializerFeature.WriteDateUseDateFormat, true);

            if (filter != null) {
View Full Code Here

Examples of com.alibaba.fastjson.serializer.JSONSerializer.config()

            JSONSerializer serializer = new JSONSerializer(out);
            for (com.alibaba.fastjson.serializer.SerializerFeature feature : features) {
                serializer.config(feature, true);
            }

            serializer.config(SerializerFeature.WriteDateUseDateFormat, true);

            if (filter != null) {
                if (filter instanceof PropertyPreFilter) {
                    serializer.getPropertyPreFilters().add((PropertyPreFilter) filter);
                }
View Full Code Here

Examples of com.alibaba.fastjson.serializer.JSONSerializer.config()

        SerializeWriter out = new SerializeWriter();

        try {
            JSONSerializer serializer = new JSONSerializer(out);
            for (com.alibaba.fastjson.serializer.SerializerFeature feature : features) {
                serializer.config(feature, true);
            }

            serializer.write(object);

            return out.toBytes("UTF-8");
View Full Code Here

Examples of com.alibaba.fastjson.serializer.JSONSerializer.config()

        SerializeWriter out = new SerializeWriter();

        try {
            JSONSerializer serializer = new JSONSerializer(out, config);
            for (com.alibaba.fastjson.serializer.SerializerFeature feature : features) {
                serializer.config(feature, true);
            }

            serializer.write(object);

            return out.toString();
View Full Code Here

Examples of com.alibaba.fastjson.serializer.JSONSerializer.config()

        SerializeWriter out = new SerializeWriter();

        try {
            JSONSerializer serializer = new JSONSerializer(out, config);
            for (com.alibaba.fastjson.serializer.SerializerFeature feature : features) {
                serializer.config(feature, true);
            }

            serializer.write(object);

            return out.toBytes("UTF-8");
View Full Code Here

Examples of com.alibaba.fastjson.serializer.JSONSerializer.config()

        SerializeWriter out = new SerializeWriter(writer);

        try {
            JSONSerializer serializer = new JSONSerializer(out);
            for (com.alibaba.fastjson.serializer.SerializerFeature feature : features) {
                serializer.config(feature, true);
            }

            serializer.write(object);
        } finally {
            out.close();
View Full Code Here

Examples of com.alibaba.fastjson.serializer.SerializeWriter.config()

public class SerializeWriterTest_4 extends TestCase {

    public void test_0() throws Exception {
        SerializeWriter out = new SerializeWriter(1);
        out.config(SerializerFeature.QuoteFieldNames, true);
        out.config(SerializerFeature.WriteTabAsSpecial, true);
        out.writeFieldValue(',', "name", "\t");
        Assert.assertEquals(",\"name\":\"\\t\"", out.toString());
    }
   
View Full Code Here

Examples of com.jengine.orm.model.field.ForeignField.config()

            List<String> parts = Arrays.asList(fieldName.split("\\."));
            ReferenceField referenceField = (ReferenceField) fields.get(parts.get(0));
            ModelManager manager = modelClass.getDb().getModelClass(referenceField.getReferenceModelName()).getManager();
            String tail = concat(parts.subList(1, parts.size()), ".").toString();
            ForeignField foreignField = new ForeignField(referenceField,  manager.getField(tail));
            foreignField.config(fieldName, this);
            return foreignField;
        } else {
            return fields.get(fieldName);
        }
    }
View Full Code Here

Examples of com.jengine.orm.model.multi.field.CalcMultiField.config()

    public Cluster field(Object field) {
        if (field instanceof String) {
            this.selectedFields.put((String) field, this.fields.get(field));
        } else if (field instanceof CalcMultiField) {
            CalcMultiField multiField = (CalcMultiField) field;
            multiField.config(this);
            this.fields.put(multiField.getName(), multiField);
            this.selectedFields.put(multiField.getName(), multiField);
        }
        return this;
    }
View Full Code Here

Examples of com.jengine.orm.model.query.filter.StringFilter.config()

    /* filter methods */

    public BaseQuery filter(String query, Object ... params) throws DBException {
        try {
            StringFilter stringFilter = new StringFilter(query, params);
            stringFilter.config(this);
            this.stringFilters.add(stringFilter);
        } catch (Exception e) {
            throw new DBException(e);
        }

View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.