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(String 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(String key)
public JsonObject getMap(String key)
public JsonArray getSequence(String key)
public JsonScalar getScalar(String 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(String 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.lang.annotation.Nullable
public JsonProperty getEntry(String key)


getEntry

@io.github.qishr.cascara.common.lang.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(String key)

Specified By:

MapAstNode


getMap

public JsonObject getMap(String key)

Specified By:

MapAstNode


getSequence

public JsonArray getSequence(String key)

Specified By:

MapAstNode


getScalar

@io.github.qishr.cascara.common.lang.annotation.Nullable
public JsonScalar getScalar(String 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(String 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