Skip to content

Package io.github.qishr.cascara.lang.json.ast

Class JsonObject

java.lang.Object
        io.github.qishr.cascara.lang.json.ast.JsonNode
                io.github.qishr.cascara.lang.json.ast.JsonObject

All Implemented Interfaces:
    MapAstNode<String, JsonNode, JsonProperty>


public class JsonObject
extends JsonNode

Constructor Summary

Constructor Description
JsonObject()
JsonObject(int line, int column)
JsonObject(JsonOptions options)
JsonObject(int line, int column, JsonOptions options)

Method Summary

Modifier and Type Method Description
public List<JsonProperty> getChildren()
public JsonProperty getEntry(Object key)
public JsonProperty getEntry(int i)
public List<JsonProperty> getEntries()
public Set<String> keySet()
public Set<JsonProperty> entrySet()
public JsonObject remove(String key)
public JsonNode get(Object key)
public JsonObject getMap(Object key)
public JsonArray getSequence(Object key)
public JsonScalar getScalar(Object key)
public JsonObject getObject(String key)
public JsonArray getArray(String key)
public JsonObject put(String key, JsonNode value)
public JsonObject put(JsonProperty entry)
public boolean containsKey(Object key)
public List<JsonNode> values()
public JsonObject put(String key, String value)
public int size()
public boolean isEmpty()
public Iterator<JsonProperty> iterator() Returns Iterator instance
public boolean equals(Object o)
public int hashCode()

Methods inherited from JsonNode

getEndColumn, getEndLine, getComments, getStartColumn, getToken, setToken, addComment, getStartLine

Method Details

getChildren

public List<JsonProperty> getChildren()

Specified By:

MapAstNode

Overrides:

JsonNode


getEntry

@io.github.qishr.cascara.common.annotation.Nullable
public JsonProperty getEntry(Object key)

Specified By:

MapAstNode


getEntry

@io.github.qishr.cascara.common.annotation.Nullable
public JsonProperty getEntry(int i)

Specified By:

MapAstNode


getEntries

public List<JsonProperty> getEntries()

Specified By:

MapAstNode


keySet

public Set<String> keySet()

Specified By:

MapAstNode


entrySet

public Set<JsonProperty> entrySet()

Specified By:

MapAstNode


remove

public JsonObject remove(String key)

Specified By:

MapAstNode


get

public JsonNode get(Object key)

Specified By:

MapAstNode


getMap

public JsonObject getMap(Object key)

Specified By:

MapAstNode


getSequence

public JsonArray getSequence(Object key)

Specified By:

MapAstNode


getScalar

@io.github.qishr.cascara.common.annotation.Nullable
public JsonScalar getScalar(Object key)

Specified By:

MapAstNode


getObject

public JsonObject getObject(String key)


getArray

public JsonArray getArray(String key)


put

public JsonObject put(String key, JsonNode value)


put

public JsonObject put(JsonProperty entry)


containsKey

public boolean containsKey(Object key)

Specified By:

MapAstNode


values

public List<JsonNode> values()

Specified By:

MapAstNode


put

public JsonObject put(String key, String value)

Specified By:

MapAstNode


size

public int size()

Specified By:

MapAstNode


isEmpty

public boolean isEmpty()

Specified By:

MapAstNode


iterator

public Iterator<JsonProperty> iterator()

Returns Iterator instance


equals

public boolean equals(Object o)

Overrides:

JsonNode


hashCode

public int hashCode()

Overrides:

JsonNode