Example usage for org.apache.solr.common.util Utils fromJSON

List of usage examples for org.apache.solr.common.util Utils fromJSON

Introduction

In this page you can find the example usage for org.apache.solr.common.util Utils fromJSON.

Prototype

public static Object fromJSON(Reader is) 

Source Link

Usage

From source file:org.apache.sentry.tests.e2e.solr.AbstractSolrSentryTestCase.java

License:Apache License

@SuppressWarnings("unchecked")
protected <T> T deserialize(Representation r) throws IOException {
    ByteArrayOutputStream str = new ByteArrayOutputStream();
    r.write(str);//  ww  w . java  2s.  c  o m
    return (T) Utils.fromJSON(str.toByteArray());
}