Skip to content

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

Class JsonProperty

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

All Implemented Interfaces:
    MapEntryAstNode<String, JsonNode>


public class JsonProperty
extends JsonNode

Represents the structural pairing of a key and a value in a JSON object.

Constructor Summary

Constructor Description
JsonProperty(int line, int column, String key, JsonNode value)
JsonProperty(String key, JsonNode value) Convenience constructor for programmatic node creation.

Method Summary

Modifier and Type Method Description
public String getKey()
public JsonNode getValue()
public JsonProperty setRaw(JsonNode value)
public List<JsonNode> getChildren()
public JsonProperty setValue(JsonNode value)
public boolean equals(Object o)
public int hashCode()

Methods inherited from JsonNode

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

Method Details

getKey

public String getKey()

Specified By:

MapEntryAstNode


getValue

public JsonNode getValue()

Specified By:

MapEntryAstNode


setRaw

public JsonProperty setRaw(JsonNode value)


getChildren

public List<JsonNode> getChildren()

Specified By:

MapEntryAstNode

Overrides:

JsonNode


setValue

public JsonProperty setValue(JsonNode value)


equals

public boolean equals(Object o)

Overrides:

JsonNode


hashCode

public int hashCode()

Overrides:

JsonNode