Package eliasstar.json.objects
Class JsonObject
- java.lang.Object
-
- eliasstar.json.objects.JsonObject
-
- All Implemented Interfaces:
JsonSerializable
public class JsonObject extends Object implements JsonSerializable
Represents a JSON object.- Since:
- 1.0.0
- Author:
- Elias*
-
-
Constructor Summary
Constructors Constructor Description JsonObject()
JsonObject(List<JsonNameValuePair<Object>> members)
JsonObject(Map<String,Object> members)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
boolean
equals(Object obj)
boolean
existsMember(String name)
List<JsonNameValuePair<Object>>
getAllMembers()
Object
getMember(String name)
Map<String,Object>
getMembers()
int
hashCode()
JsonObject
removeMember(String name)
void
setAllMembers(List<JsonNameValuePair<Object>> members)
JsonObject
setMember(String name, Object value)
JsonObject
setMember(String name, Object value, int index)
void
setMembers(Map<String,Object> members)
String
toJson()
String
toString()
-
-
-
Method Detail
-
setMember
public JsonObject setMember(String name, Object value)
-
setMember
public JsonObject setMember(String name, Object value, int index)
-
removeMember
public JsonObject removeMember(String name)
-
existsMember
public boolean existsMember(String name)
-
setAllMembers
public void setAllMembers(List<JsonNameValuePair<Object>> members)
-
getAllMembers
public List<JsonNameValuePair<Object>> getAllMembers()
-
clear
public void clear()
-
toJson
public String toJson()
- Specified by:
toJson
in interfaceJsonSerializable
-
-