BrightSide Workbench Full Report + Source Code
org.turro.elephant.impl.util.JsonReader Class Reference

Public Member Functions

 JsonReader (File file)
 
 JsonReader (String json)
 
List list (String path) throws IOException
 
Map map (String path) throws IOException
 
String read (String path) throws IOException
 
Object read (String path, String javaClass) throws IOException
 
JsonReader put (String path, String key, Object value) throws IOException
 
JsonReader add (String path, Object value) throws IOException
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 33 of file JsonReader.java.

Constructor & Destructor Documentation

◆ JsonReader() [1/2]

org.turro.elephant.impl.util.JsonReader.JsonReader ( File  file)

Definition at line 38 of file JsonReader.java.

38  {
39  this.file = file;
40  this.json = null;
41  }

◆ JsonReader() [2/2]

org.turro.elephant.impl.util.JsonReader.JsonReader ( String  json)

Definition at line 43 of file JsonReader.java.

43  {
44  this.json = json;
45  this.file = null;
46  }

Member Function Documentation

◆ add()

JsonReader org.turro.elephant.impl.util.JsonReader.add ( String  path,
Object  value 
) throws IOException

Definition at line 73 of file JsonReader.java.

73  {
74  load().add(path, value);
75  return this;
76  }

◆ list()

List org.turro.elephant.impl.util.JsonReader.list ( String  path) throws IOException

Definition at line 48 of file JsonReader.java.

48  {
49  return load().read(path, java.util.List.class);
50  }

◆ map()

Map org.turro.elephant.impl.util.JsonReader.map ( String  path) throws IOException

Definition at line 52 of file JsonReader.java.

52  {
53  return load().read(path, java.util.Map.class);
54  }

◆ put()

JsonReader org.turro.elephant.impl.util.JsonReader.put ( String  path,
String  key,
Object  value 
) throws IOException

Definition at line 68 of file JsonReader.java.

68  {
69  load().put(path, key, value);
70  return this;
71  }

◆ read() [1/2]

String org.turro.elephant.impl.util.JsonReader.read ( String  path) throws IOException

Definition at line 56 of file JsonReader.java.

56  {
57  return load().read(path);
58  }

◆ read() [2/2]

Object org.turro.elephant.impl.util.JsonReader.read ( String  path,
String  javaClass 
) throws IOException

Definition at line 60 of file JsonReader.java.

60  {
61  return load().read(path, ReflectionUtil.classCheck(javaClass));
62  }

The documentation for this class was generated from the following file: