Search in sources :

Example 6 with JSONWriter

use of org.noggit.JSONWriter in project lucene-solr by apache.

the class TestDelegationTokenResponse method getMapJson.

private String getMapJson(String key, Object value) {
    CharArr out = new CharArr();
    JSONWriter w = new JSONWriter(out, 2);
    Map<String, Object> map = new HashMap<String, Object>();
    map.put(key, value);
    w.write(map);
    return out.toString();
}
Also used : JSONWriter(org.noggit.JSONWriter) HashMap(java.util.HashMap) CharArr(org.noggit.CharArr)

Aggregations

CharArr (org.noggit.CharArr)6 JSONWriter (org.noggit.JSONWriter)6 HashMap (java.util.HashMap)2 Map (java.util.Map)2 ByteArrayInputStream (java.io.ByteArrayInputStream)1 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 LinkedHashMap (java.util.LinkedHashMap)1 ClusterState (org.apache.solr.common.cloud.ClusterState)1 DocCollection (org.apache.solr.common.cloud.DocCollection)1 LocalSolrQueryRequest (org.apache.solr.request.LocalSolrQueryRequest)1 SolrQueryRequest (org.apache.solr.request.SolrQueryRequest)1 Test (org.junit.Test)1