Iterator<JsonValue> iter = array.iterator() ;
for ( ; iter.hasNext() ; )
{
BindingMap b = BindingFactory.create() ;
JsonValue v = iter.next() ;
if ( ! v.isObject() )
throw new ResultSetException("Entry in 'bindings' array must be an object {}") ;
JsonObject x = v.getAsObject() ;
Set<String> varNames = x.keys() ;
for ( String vn : varNames )
{
if ( ! vars.contains(vn) )
; // Warning
JsonValue vt = x.get(vn) ;
if ( ! vt.isObject() )
throw new ResultSetException("Binding for variable '"+vn+"' is not a JSON object: "+vt) ;
Node n = parseOneTerm(vt.getAsObject()) ;
b.add(Var.alloc(vn), n) ;
}
rows.add(b) ;
}
}