Package org.amplafi.json

Examples of org.amplafi.json.JSONStringer


        assertEquals(jsonWriter.toString(),
        "{\"validation\":{\"flowValidationTracking\":[{\"key\":\"foo\",\"parameters\":[\"foo\"]}]}}");
    }

    private JSONWriter getJsonWriter() {
        JSONWriter jsonWriter = new JSONStringer();
        jsonWriter.addRenderer(flowValidationResultJsonRenderer);
        jsonWriter.addRenderer(flowValidationTrackingJsonRenderer);
        return jsonWriter;
    }
View Full Code Here


    public String toFlowString(Object value) {
        String strV = null;
        if ( value instanceof String ) {
            strV = (String) value;
        } else if ( value != null ) {
            JSONStringer stringer = new JSONStringer();
            stringer.value(value);
            strV = stringer.toString();
            if (strV.startsWith("\"") && strV.endsWith("\"")) {
                // trim off unneeded " that appear when handling simple objects.
                strV = strV.substring(1, strV.length()-1);
            }
        }
View Full Code Here

        for(FlowPropertyDefinition definition: values) {
            resolve(context, definition);
        }
    }
    public IJsonWriter getJsonWriter() {
        IJsonWriter writer = new JSONStringer(new MapByClass<JsonRenderer<?>>(this.jsonRenderers));
        return writer;
    }
View Full Code Here

        return transitionCompletionMessage;
    }

    @Override
    public String toString() {
        JSONStringer writer = new JSONStringer();
        writer.value(this);
        return writer.toString();
    }
View Full Code Here

        DataClassDefinition dataClassDefinition, Object serializedObject) throws FlowValidationException {
        return (T) JSONObject.unquote(serializedObject.toString());
    }
    @Override
    public IJsonWriter getJsonWriter() {
        return new JSONStringer();
    }
View Full Code Here

TOP

Related Classes of org.amplafi.json.JSONStringer

Copyright © 2018 www.massapicom. 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.