@@ -18,55 +18,55 @@ public final class JsonObject implements Json<Map<String, Object>> {
1818 /**
1919 * Reads Object from a reader. Reader will
2020 * stop at the next clean char after object.
21- * @param contextExtractor
21+ * @param parser
2222 * @throws IOException
2323 */
2424 public JsonObject (
25- final Json . ContextExtractor
26- contextExtractor ) throws IOException {
27- contextExtractor .startObject ();
28- boolean eoo = endOfObject (contextExtractor );
25+ final Parser
26+ parser ) throws IOException {
27+ parser .startObject ();
28+ boolean eoo = endOfObject (parser );
2929 // This is Empty Object
3030 if (eoo ) {
31- contextExtractor .setCursorToNextClean ();
31+ parser .setCursorToNextClean ();
3232 jsonObject = Collections .emptyMap ();
3333 } else {
3434 jsonObject = new HashMap <>();
3535 String key ;
3636 while (!eoo ) {
37- key = new JsonString (contextExtractor ).read ();
38- contextExtractor .next (':' );
37+ key = new JsonString (parser ).read ();
38+ parser .next (':' );
3939 jsonObject .put (key ,
40- contextExtractor .parse ());
41- eoo = endOfObject (contextExtractor );
40+ parser .parse ());
41+ eoo = endOfObject (parser );
4242 }
43- contextExtractor .setCursorToNextClean ();
43+ parser .setCursorToNextClean ();
4444 }
4545
46- contextExtractor .endObject ();
46+ parser .endObject ();
4747 }
4848
4949 /**
5050 * Determines the Object End. By moving till " or }.
51- * @param contextExtractor
51+ * @param parser
5252 * @return flag
5353 * @throws IOException
5454 */
55- private static boolean endOfObject (final Json . ContextExtractor
56- contextExtractor ) throws IOException {
55+ private static boolean endOfObject (final Parser
56+ parser ) throws IOException {
5757 char character ;
58- if (contextExtractor .getCursor () == ',' ) {
59- while (contextExtractor .getCharacter () != '"' ) {
58+ if (parser .getCursor () == ',' ) {
59+ while (parser .getCharacter () != '"' ) {
6060 continue ;
6161 }
6262 return false ;
6363 }
6464
65- if (contextExtractor .getCursor () == '}' ) {
65+ if (parser .getCursor () == '}' ) {
6666 return true ;
6767 }
6868
69- while ((character = contextExtractor .getCharacter ()) != '"'
69+ while ((character = parser .getCharacter ()) != '"'
7070 && character != '}' ) {
7171 continue ;
7272 }
0 commit comments