Package org.apache.sling.feature.io.json

# Class FeatureJSONReader

java.lang.Object
org.apache.sling.feature.io.json.FeatureJSONReader

public class FeatureJSONReader extends Object
This class offers a static method to read a `Feature` using a `Reader` instance.

## Method Summary

Modifier and Type
Method
Description
`static Feature`
`read(Reader reader, String location)`
Read a new feature from the reader The reader is not closed.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Method Details

### read

public static Feature read(Reader reader, String location) throws IOException
Read a new feature from the reader The reader is not closed. It is up to the caller to close the reader.

Parameters:
  `reader` - The reader for the feature
  `location` - Optional location
Returns:
  The read feature
Throws:
  `IOException` - If an IO errors occurs or the JSON is invalid.