|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface KeenJsonHandler
Interface for abstracting the tasks of converting an input Reader into an
in-memory object (in the form of a Map<String, Object>), and for writing that
object back out to a Writer.
This interface allows the Keen library to be configured to use different JSON implementations in different environments, depending upon requirements for speed versus size (or other considerations).
| Method Summary | |
|---|---|
java.util.Map<java.lang.String,java.lang.Object> |
readJson(java.io.Reader reader)
Reads JSON-formatted data from the provided Reader and constructs a
Map representing the object described. |
void |
writeJson(java.io.Writer writer,
java.util.Map<java.lang.String,?> value)
Writes the given object (in the form of a Map<String, Object> to the specified
Writer. |
| Method Detail |
|---|
java.util.Map<java.lang.String,java.lang.Object> readJson(java.io.Reader reader)
throws java.io.IOException
Reader and constructs a
Map representing the object described. The keys of the map should
correspond to the names of the top-level members, and the values may primitives (Strings,
Integers, Booleans, etc.), Maps, or Iterables.
reader - The Reader from which to read the JSON data.
Map<String, Object>.
java.io.IOException - If there is an error reading from the input.
void writeJson(java.io.Writer writer,
java.util.Map<java.lang.String,?> value)
throws java.io.IOException
Map<String, Object> to the specified
Writer.
writer - The Writer to which the JSON data should be written.value - The object to write.
java.io.IOException - If there is an error writing to the output.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||