Search in sources :

Example 6 with JsonBuilder

use of groovy.json.JsonBuilder in project page-factory-2 by sbtqa.

the class BodyArray method toString.

/**
 * @return JSON array fragment
 */
@Override
public String toString() {
    if (array.isEmpty()) {
        return "[]";
    }
    JsonBuilder builder = new JsonBuilder();
    builder.call(array);
    return builder.toString();
}
Also used : JsonBuilder(groovy.json.JsonBuilder)

Aggregations

JsonBuilder (groovy.json.JsonBuilder)6 Test (org.junit.Test)2 Value (eu.esdihumboldt.hale.common.core.io.Value)1 ValueList (eu.esdihumboldt.hale.common.core.io.ValueList)1 LookupTable (eu.esdihumboldt.hale.common.lookup.LookupTable)1 LookupTableImpl (eu.esdihumboldt.hale.common.lookup.impl.LookupTableImpl)1 Closure (groovy.lang.Closure)1 GString (groovy.lang.GString)1 FileReader.readToString (io.restassured.internal.support.FileReader.readToString)1 HashMap (java.util.HashMap)1 MethodClosure (org.codehaus.groovy.runtime.MethodClosure)1