eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'JSONObject':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: JSONObject


Inheritance:

   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

Description:


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).

copyright

COPYRIGHT (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.

Instance protocol:

accessing
o  doesNotUnderstand: message
respond to getter/setter messages for known fields

converting
o  asInstanceOfClass: aClass
create an instance of aClass and initialize it from my slots.

printing & storing
o  displayOn: aGCOrStream
(comment from inherited method)
print a representation of the receiver on aGCOrStream for display in inspectors etc.

o  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.



ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Mon, 18 Nov 2024 04:29:05 GMT