Package jminusminus
Class JSONElement
java.lang.Object
jminusminus.JSONElement
Representation of an element with a JSON document.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddAttribute(String name, String value) Adds an attribute to this JSON element with the given name and value.voidaddAttribute(String name, ArrayList<String> value) Adds an attribute to this JSON element with the given name and value as a list of strings.voidaddChild(String name, JSONElement child) Adds a child to this JSON element with the given name.toString()Returns a string representation of this JSON element.
- 
Constructor Details- 
JSONElementpublic JSONElement()Constructs an empty JSON element.
 
- 
- 
Method Details- 
addAttributeAdds an attribute to this JSON element with the given name and value.- Parameters:
- name- name of the attribute.
- value- value of the attribute.
 
- 
addAttributeAdds an attribute to this JSON element with the given name and value as a list of strings.- Parameters:
- name- name of the attribute.
- value- value of the attribute as a list of strings.
 
- 
addChildAdds a child to this JSON element with the given name.- Parameters:
- name- name of the child.
- child- the child.
 
- 
toStringReturns a string representation of this JSON element.
 
-