|
Class: JSONObject
Object
|
+--Collection
|
+--Set
|
+--Dictionary
|
+--OrderedDictionary
|
+--JSONObject
- Package:
- stx:goodies/communication
- Category:
- Net-Communication-JSON
- Version:
- rev:
1.12
date: 2022/07/08 06:27:33
- user: cg
- file: JSONObject.st directory: goodies/communication
- module: stx stc-classLibrary: communication
I behave both as a dictionary and as an object with getters and setters,
(with selectors which correspond to my slot names)
|o|
o := JSONObject new.
o at:'foo' put:123.
o bar:999.
o baz:'hello'.
Transcript showCR:(o foo).
Transcript showCR:(o bar).
Transcript showCR:(o baz).
Transcript showCR:(o at:'baz').
Transcript showCR:(JSONPrinter toJSON:o).
copyrightCOPYRIGHT (c) 2020 by eXept Software AG
All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
inclusion of the above copyright notice. This software may not
be provided or otherwise made available to, or used by, any
other person. No title to or ownership of the software is
hereby transferred.
accessing
-
doesNotUnderstand: message
-
respond to getter/setter messages for known fields
converting
-
asInstanceOfClass: aClass
-
create an instance of aClass and initialize it from my slots.
printing & storing
-
displayOn: aGCOrStream
-
(comment from inherited method)
print a representation of the receiver on aGCOrStream for display in inspectors etc.
-
printOn: aStream
-
(comment from inherited method)
append a user readable representation of the receiver to aStream.
The text appended is not meant to be read back for reconstruction of
the receiver. Also, this method limits the size of generated string.
|